|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-01-25 00:44 UTC] konstantin at schukraft dot org
Description: ------------ This could be related to bug #18413, but here, I don't mix styles within the same layer like it was done in 18413, therefor this code should definitly work. PHP should be able to find associate the else with the first if, not the second. Reproduce code: --------------- if(true): if(true) { } else: endif; Expected result: ---------------- Parsing without problems. Actual result: -------------- Parse error: syntax error, unexpected ':' in whatever.php on line X where X is the line with the "else:" PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Sun Jun 14 04:00:01 2026 UTC |
In this case, use ';' after bracket. e.g. if (true): if (true) { // do something }; else: // ... endif;