php object variable | how to use object in php with creating class
<?php
$obj = (object) 'ciao';
$obj->saddam = $obj;
echo "<pre>";
$obj->saddam->info=$obj->saddam;
//var_dump($obj->saddam->info);// outputs 'ciao'
//$arrayName = array($obj);
print_r(var_dump($arrayName));
?>
<?php
$obj = (object) 'ciao';
$obj->saddam = $obj;
echo "<pre>";
$obj->saddam->info=$obj->saddam;
//var_dump($obj->saddam->info);// outputs 'ciao'
//$arrayName = array($obj);
print_r(var_dump($arrayName));
?>
Comments
Post a Comment