- var_dump: documentation ( source)
<?php
class Test{
}
function staticize( &$main_object = NULL ){
static $static_object = NULL;
if( $main_object )
$static_object = $main_object;
return $static_object;
}
$a = staticize( new Test );
var_dump( $a );
$b = staticize( new Test );
var_dump( $b );