#25841 [Opn->Bgs]: ternary returns by-value rather than by-reference, although if/else works fine

From: Date: Mon, 13 Oct 2003 00:52:20 +0000
Subject: #25841 [Opn->Bgs]: ternary returns by-value rather than by-reference, although if/else works fine
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-48872@lists.php.net to get a copy of this message
ID: 25841 Updated by: sniper@php.net Reported By: pluggz24 at yahoo dot com -Status: Open +Status: Bogus Bug Type: Class/Object related Operating System: Slackware Linux 8.1, Windows XP PHP Version: 4.3.2 New Comment: See bug #12247 Previous Comments: ------------------------------------------------------------------------ [2003-10-11 16:07:58] pluggz24 at yahoo dot com Description: ------------ a sample script/output demonstrating/explaining this bug can be found here: http://republic.acmeshells.com/~plugged/ternary_bug.txt Reproduce code: --------------- http://republic.acmeshells.com/~plugged/ternary_bug.txt Expected result: ---------------- test using if/else: $b->var: hi $a->var->var: hi test using ternary: $b->var: hi $a->var->var: hi Actual result: -------------- test using if/else: $b->var: hi $a->var->var: hi test using ternary: $b->var: hi $a->var->var: hello ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25841&edit=1

« previous php.bugs (#48872) next »