php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #45926 Improper code interpretation without compound statement
Submitted: 2008-08-26 17:05 UTC Modified: 2010-01-18 22:53 UTC
From: atomo64 at gmail dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: 5.2.6 OS: linux 2.6
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: atomo64 at gmail dot com
New email:
PHP Version: OS:

 

 [2008-08-26 17:05 UTC] atomo64 at gmail dot com
Description:
------------
Conditional statements resulting into non-php code (?> foo <?php) 
without compound statements are not properly interpreted.

Reproduce code:
---------------
<?php
if (false) {
    ?>nothing here<?php
}
if (false)
    ?>oops, something here<?php
?>

Expected result:
----------------
(no output)

Actual result:
--------------
oops, something here

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-08-26 22:15 UTC] jani@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php


 [2008-08-26 22:42 UTC] atomo64 at gmail dot com
This bug was submitted at Debian and after re-checking the manual I 
found no defined behaviour. But if ?>oops, something here<?php is 
not interpreted as an statement then the following script should not 
print "foo\n":

<?php
 if (false) {
    ?>nothing here<?php
 }
 if (false)
    ?>oops, something here<?php
    echo "foo\n";
?>

I believe there's a bug here, either in the interpreter or in the 
documentation.
 [2010-01-18 22:40 UTC] atomo64 at gmail dot com
No response to my last message?
 [2010-01-18 22:44 UTC] rasmus@php.net
I wouldn't call it a doc bug.  More like missing documentation.  But 
you submitted it as a scripting engine bug which it definitely is not.
 [2010-01-18 22:53 UTC] atomo64 at gmail dot com
Ok, changing its category.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jan 05 05:01:28 2025 UTC