PHP 4.0 Bug #6268: ternary op return only by value
| From: | waldschrott@php.net | Date: | Mon, 21 Aug 2000 01:06:21 +0000 |
| Subject: | PHP 4.0 Bug #6268: ternary op return only by value | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-29987@lists.php.net to get a copy of this message | ||
From: waldschrott@php.net
Operating system: *
PHP version: 4.0 Latest CVS (20/08/2000)
PHP Bug Type: Feature/Change Request
Bug description: ternary op return only by value
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
<?php
$test1=1;
$test2=2;
$test3=3;
echo $x =& $test ? $test2:$test3;
echo $x;
$x=5;
echo $test3;
?>