#21108 [Opn->Bgs]: ?: evaluates to copy of object

From: Date: Fri, 20 Dec 2002 11:10:02 +0000
Subject: #21108 [Opn->Bgs]: ?: evaluates to copy of object
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-28094@lists.php.net to get a copy of this message
ID: 21108 Updated by: derick@php.net Reported By: RNova@gmx.net -Status: Open +Status: Bogus Bug Type: Scripting Engine problem Operating System: Windows 98 PHP Version: 4.2.3 New Comment: Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely to be the same. Because of this, we hope you add your comments to the existing bug instead. Thank you for your interest in PHP. Previous Comments: ------------------------------------------------------------------------ [2002-12-20 04:53:05] RNova@gmx.net Since I do not know the internals of PHP, it's probably best to just give an example: $a = 11; function &f() { return TRUE ? $GLOBALS['a'] : $GLOBALS['a']; } function &g() { return $GLOBALS['a']; } $b =& f(); $b = 12; echo $a."<hr>"; $c =& g(); $c = 13; echo $a; ----- output: 11<hr>13 expected output: 12<hr>13 Thanks for fixing this, Cheers, Rai ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=21108&edit=1

« previous php.bugs (#28094) next »