Bug #72543 [PATCH]: different references behavior comparing to 5.5

From: Date: Wed, 06 Jul 2016 00:31:03 +0000
Subject: Bug #72543 [PATCH]: different references behavior comparing to 5.5
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-202083@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=72543&edit=1 ID: 72543 Patch added by: dmitry@php.net Reported by: tony2001@php.net Summary: different references behavior comparing to 5.5 Status: Assigned Type: Bug Package: Scripting Engine problem Operating System: * PHP Version: 7.1.0alpha1 Assigned To: dmitry Block user comment: N Private report: N New Comment: The following patch has been added/updated: Patch Name: bug72543_3.diff Revision: 1467765063 URL: https://bugs.php.net/patch-display.php?bug=72543&patch=bug72543_3.diff&revision=1467765063 Previous Comments: ------------------------------------------------------------------------ [2016-07-05 19:57:48] dmitry@php.net The following patch has been added/updated: Patch Name: bug72543_2.diff Revision: 1467748668 URL: https://bugs.php.net/patch-display.php?bug=72543&patch=bug72543_2.diff&revision=1467748668 ------------------------------------------------------------------------ [2016-07-05 11:19:59] laruence@php.net does your patch also take care of $arr = 'b'; $$arr['b']['b'] = $b['b']; ? ------------------------------------------------------------------------ [2016-07-05 10:45:34] dmitry@php.net The following patch has been added/updated: Patch Name: bug72543.diff Revision: 1467715534 URL: https://bugs.php.net/patch-display.php?bug=72543&patch=bug72543.diff&revision=1467715534 ------------------------------------------------------------------------ [2016-07-05 09:58:48] dmitry@php.net Before execution of the following statement $copy['b'] is a "dead" REFERENCE with refcount==1. $copy['b']['b'] = $copy['b']; Right-side expression evaluated first, and incrementats REFERENCE refcount (it became 2). After that, it starts to behave as a real REFERENCE and is not separated during left-side expression evaluation. ------------------------------------------------------------------------ [2016-07-05 03:17:14] laruence@php.net yeah, I agree with that, but if cheaper fix is mess, than I prefer a clear one, besides, one UNEXPECT check should not change anything in performance. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=72543 -- Edit this bug report at https://bugs.php.net/bug.php?id=72543&edit=1

« previous php.bugs (#202083) next »