[PHP-DEV] Re: Memory corruption in Zend, should we allow this? From: Stanislav Malyshev (stas <email protected>)
Date: 03/15/01

AL>> $foobar->rfoo=&$a;
AL>> $foobar->r2foo=&$foobar->rfoo;
AL>> $foobar->rfoo=4;
AL>>
AL>> What are we assigning 4 here to?

To all three of them, which are all reference-bound.

AL>> The first question is, should we allow this? I think no,
AL>> references to non-existing variables should be disallowed
AL>> (although Zend allows a lot, this is no good).

There's no such thing anyway - when variable needed (inlcuding taking it's
address for referencing) it's created.

AL>> I tried to simply do a
AL>> echo $a;
AL>> afterwards and wow!!! It works, sometimes! Intermittently PHP crashes,
AL>> without reasons, in this case I put this code below by accident

For me, it works each and every time. But I'm on Linux.

-- 
Stanislav Malyshev, Zend Products Engineer
stas <email protected>  http://www.zend.com/ +972-3-6139665 ext.115

-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>