Core Function BinaryWipe
From Sputnik Wiki
(Difference between revisions)
(→Example) |
m (1 revision) |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 5: | Line 5: | ||
=== Description === | === Description === | ||
− | Wipes a binary variables data 100% and sets the variable to a blank int containing | + | Wipes a binary variables data 100% and sets the variable to a blank int containing null. |
=== Parameters === | === Parameters === | ||
Line 21: | Line 21: | ||
=== Remarks === | === Remarks === | ||
− | This will only | + | This will wipe not only this variable but all variables that are using to this binary variable as a ref etc. |
− | + | ||
− | + | ||
=== Example === | === Example === | ||
<syntaxhighlight lang="sputnik"> | <syntaxhighlight lang="sputnik"> | ||
− | $binary = Pack(" | + | $binary = Pack("A*", "Hello World!\n" x 1000); |
− | println( "Before Wipe: " . Unpack(" | + | println( "Before Wipe: " . Unpack("A*", $binary, 3) ); |
BinaryWipe($binary); | BinaryWipe($binary); | ||
println( "After Wipe: " . $binary ); | println( "After Wipe: " . $binary ); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | Also, this is just as effective. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
<syntaxhighlight lang="sputnik"> | <syntaxhighlight lang="sputnik"> | ||
− | $binary = Pack(" | + | $binary = Pack("A*", "Hello World!\n" x 1000); |
− | println( "Before Wipe: " . Unpack(" | + | println( "Before Wipe: " . Unpack("A*", $binary, 3) ); |
unset($binary); | unset($binary); | ||
println( "After Wipe: " . $binary ); | println( "After Wipe: " . $binary ); |
Latest revision as of 12:38, 14 June 2015
BinaryWipe( <binary-array> )
Contents |
Description
Wipes a binary variables data 100% and sets the variable to a blank int containing null.
Parameters
binary-array
The binary variable to wipe.
Return Value
Success: Returns 1.
Failure: Returns 0.
Remarks
This will wipe not only this variable but all variables that are using to this binary variable as a ref etc.
Example
$binary = Pack("A*", "Hello World!\n" x 1000); println( "Before Wipe: " . Unpack("A*", $binary, 3) ); BinaryWipe($binary); println( "After Wipe: " . $binary );
Also, this is just as effective.
$binary = Pack("A*", "Hello World!\n" x 1000); println( "Before Wipe: " . Unpack("A*", $binary, 3) ); unset($binary); println( "After Wipe: " . $binary );