|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-04-30 02:36 UTC] laruence@php.net
[2013-04-30 02:36 UTC] laruence@php.net
-Status: Open
+Status: Not a bug
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 04:00:01 2025 UTC |
Description: ------------ 5.4.3 using WAMP To reproduce The bug occurs only when you include the else: portion. <?php if (1): if (1){} else: endif; ?> result: syntax error: unexpected ':' Test script: --------------- <?php //parse error if (1): if (1){} else: endif; //works fine if (1): if (1){}?><? else: endif; ?> Expected result: ---------------- I expect to be able to use a traditional control structure syntax within the alternative syntax and have it parse correctly. Actual result: -------------- if else: is added after an if (): block that contains a traditional if statement w/o adding ?><? then it will be a parse error.