ID:               43931
 Updated by:       [EMAIL PROTECTED]
 Reported By:      konstantin at schukraft dot org
 Status:           Open
 Bug Type:         Scripting Engine problem
 Operating System: Debian Linux 2.6.20
 PHP Version:      4.4.8
 New Comment:

In this case, use ';' after bracket.

e.g.

if (true):
    if (true)
    {
        // do something
    };
else:
    // ...
endif;


Previous Comments:
------------------------------------------------------------------------

[2008-01-25 00:44:22] 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:"


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=43931&edit=1

Reply via email to