|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #6268 ternary op return only by value
Submitted: 2000-08-20 21:06 UTC Modified: 2014-10-12 14:22 UTC
Avg. Score:2.3 ± 0.9
Reproduced:0 of 0 (0.0%)
From: Assigned:
Status: Wont fix Package: Scripting Engine problem
PHP Version: 4.0 Latest CVS (20/08/2000) OS: *
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2000-08-20 21:06 UTC]
don?t know if it?s possible to change nor if it?s needed - just noticed that it?s not possible... I think ternary returns values and not references only, don?t know a solution other than maybe a ?& b:c
all other functions can return references, ? can?t, although it is an operator, it is used function-like

echo $x =& $test ?	$test2:$test3;
echo $x;
echo $test3;


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-11-19 00:07 UTC]
-Package: Feature/Change Request +Package: Scripting Engine problem
 [2014-10-12 14:22 UTC]
-Status: Open +Status: Wont fix
 [2014-10-12 14:22 UTC]
Closing as this is by-design. Ternary is an expression so it returns values.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Mon Jan 30 02:03:43 2023 UTC