|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[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
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 17:00:02 2025 UTC |
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.