Re: unable to unset reference

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hence my previous gibberish, I would expect a reference to be destroyed
when the object is, but obviously it's not.

It has nothing specifically to do with objects, it's all about how references are handled.

$ php -a
Interactive mode enabled

<?php
$a = '12345';
$b = &$a;
unset($a);
var_dump($b);
string(5) "12345"


Sara Goleman will explain it much better than I can:

http://blog.libssh2.org/index.php?/archives/51-Youre-being-lied-to..html

ie - it's by design and will (probably) not change.

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux