Re: serializing references, almost without modifications

From: Date: Wed, 19 Jul 2000 13:12:34 +0000
Subject: Re: serializing references, almost without modifications
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-25082@lists.php.net to get a copy of this message
At 15:00 19-7-00 +0200, waldschrott wrote:
$a = 1; $b =& $a; $b = 2;
$b points to the adress of $a, should not be different from other languages... $b and $a are completely equally stored then in memory then? not they aren´t, cos I can do... $obj->foo=1; $obj2->foo=&$obj->foo; var_dump($obj); result in: object(stdClass)(1) { ["foo"]=> int(1) } var_dump($obj2); results in: object(stdClass)(1) { ["foo"]=> &int(1) } how does var_dump() than that´s reference, following you words it should not know this. again, if var_dump() can retrieve this info, a function ref_dump() could find that variable in memory which is *not* a reference and then serialize:
And what if there are two or more matching variables? what will be the right one?
object(stdClass)(1) { ["foo"]=> int(1) } and object(stdClass)(1) { ["foo"]=> reference(obj->foo) } regards --
o----------0-¬---------O-·---¬----o---®-----o o    O   °       .
| http://www.kiffen.de | pRoteçt y0ur bRaín |0  O °     ¤  °        ·
0°·³°²'²³-¹'³´³°^°³~³²³°'³²²¨³²^³¹³²°²³`³º³°Þ ° o © ° . ·
| psychedelic experience |  gott@kiffen.de  | O   ° o           °
o-¬--o--0-----©-·--O-----o-----0-¤----------o 0 ° · ° . ¤ · -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net For additional commands, e-mail: php-dev-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net


« previous php.dev (#25082) next »