beware unset() destroys references
$x = 'x';
change( $x );
echo $x; // outputs "x" not "q23" ---- remove the unset() and output is "q23" not "x"
function change( & $x )
{
unset( $x );
$x = 'q23';
return true;
}
beware unset() destroys references
$x = 'x';
change( $x );
echo $x; // outputs "x" not "q23" ---- remove the unset() and output is "q23" not "x"
function change( & $x )
{
unset( $x );
$x = 'q23';
return true;
}