From:             blackei2k at gmx dot de
Operating system: 
PHP version:      4.3.2
PHP Bug Type:     Documentation problem
Bug description:  ternary goes crazy

Description:
------------
I'm using the ternary operator which calls a function. The output is not
there where it should be, but a few liens above. I don't get any errors.


Reproduce code:
---------------
function foo()
{
 echo "foo";
}

...

while($obj = mysql_fetch_object($result)){
 echo ($obj->id == $id ? "<td>".foo()."</td>" : "<td>haha</td>");
}

Expected result:
----------------
that the output is where it should be.
i'm listing rows and only in one row ($obj->id == $id) is true.

the output of foo can be found dozens of lines above from where it should
be.


-- 
Edit bug report at http://bugs.php.net/?id=25459&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=25459&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=25459&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=25459&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=25459&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=25459&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=25459&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=25459&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=25459&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=25459&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=25459&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=25459&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25459&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=25459&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=25459&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=25459&r=gnused

Reply via email to