|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-10-04 14:38 UTC] nikic@php.net
-Status: Open
+Status: Not a bug
[2013-10-04 14:38 UTC] nikic@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 05:00:01 2025 UTC |
Description: ------------ This happens when I try to re-use a variable that was used to hold a reference to another variable for holding an object reference. If I remove the second line or use unset, it works as expected. But AFAIK it's not required to unset variables before assigning it a new value. Test script: --------------- $num = 123; $ref = &$num; $obj = new stdClass(); $ref = $obj; $num = 321; var_dump($ref); Expected result: ---------------- class stdClass#1 (0) { } Actual result: -------------- int(321)