|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36288 fastcgi crashes on ternary operator and $foo{x}
Submitted: 2006-02-04 23:17 UTC Modified: 2006-02-05 10:25 UTC
Avg. Score:4.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: scripts at freq9 dot de Assigned:
Status: Closed Package: Variables related
PHP Version: 6CVS-2006-02-04 (snap) OS: Windows XP Prof.
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: scripts at freq9 dot de
New email:
PHP Version: OS:


 [2006-02-04 23:17 UTC] scripts at freq9 dot de
When I execute this code, fastcgi crashes and i?ll get an Error 500.

Reproduce code:

    $foo   = 'hello';
    $bar   = 'world';
    $fname = ($foo{4} != 'x') ?  /* condition */
               $foo.' '.$bar :   /* is true */
               $foo.$bar;        /* is false */
    echo $fname;


Expected result:
hello world

Actual result:
FastCGI crashes & Error 500 (Premature end of script headers)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-02-04 23:35 UTC]
Does CLI work in the same time? 
Please explain what does it mean "crashes" and provide more info.
Also, I can't reproduce it on Linux. 
 [2006-02-05 00:05 UTC] scripts at freq9 dot de
if php_operator is loaded fastcgi/cli crashes!

cli# php -f test.php
> CLI hat ein Problem festgestellt und muss beendet werden.

browser# http://localhost/test.php
> CGI / FastCGI hat ein Problem festgestellt und muss beendet werden.

 [2006-02-05 01:25 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

Bug was in PECL/operator extension.  Forgot to take into account string offsets.
 [2006-02-05 10:25 UTC]
Please report PECL bugs to PECL bugsystem.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Jul 30 11:01:23 2021 UTC