Hi,
I have encountered yet another reference issue. I tested this on PHP
4.3.10 and 4.3.11RC1 on both windows and linux.
Here is a script that reproduces the issue:
http://www.backendmedia.com/PHP/reference_bug.phps
In the comments at the top you can also see my "hack" which fixes the
problem for me.
I have also tried Derick's patch on the 4.3.11RC1 install on linux, but
this didnt change the situation at all.
regards,
Lukas
That's expected behaviour. Have a look at http://bugs.php.net/20993 .
The problem can also be prevented by the following hack:
// modifying and assining branch causes unexpexted results to
$this->tree
$metatree[$object_id] = (array)unserialize(serialize($branch));
Regards,
Moriyoshi
Hi,
I have encountered yet another reference issue. I tested this on PHP
4.3.10 and 4.3.11RC1 on both windows and linux.Here is a script that reproduces the issue:
http://www.backendmedia.com/PHP/reference_bug.phpsIn the comments at the top you can also see my "hack" which fixes the
problem for me.I have also tried Derick's patch on the 4.3.11RC1 install on linux,
but this didnt change the situation at all.regards,
Lukas
That's expected behaviour. Have a look at http://bugs.php.net/20993 .
Sorry, but this is not expected - it's a bug.
Derick
--
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org
Derick Rethans wrote:
That's expected behaviour. Have a look at http://bugs.php.net/20993 .
Sorry, but this is not expected - it's a bug.
I would also like to disagree. I think this is a huge inconsistency that
should be addressed even if that costs performance.
If however the core php developers do think this behavior should stick,
then there should be a function that allows people to clean these
references without such hacks (even if internally these hacks are still
going on).
regards,
Lukas
Derick Rethans wrote:
That's expected behaviour. Have a look at http://bugs.php.net/20993 .
Sorry, but this is not expected - it's a bug.I would also like to disagree. I think this is a huge inconsistency
that should be addressed even if that costs performance.
I agree that it's not intuitive at all, though this issue was discussed
ending up with the following words.
http://marc.theaimsgroup.com/?l=php-dev&m=104018832405963&w=2
If however the core php developers do think this behavior should
stick, then there should be a function that allows people to clean
these references without such hacks (even if internally these hacks
are still going on).
I think it's possible to add such a function to the 5.x branches.
Moriyoshi