#48255 [Opn->Ver]: Mixing control structure syntaxes causes parse error

From: Date: Wed, 13 May 2009 18:38:07 +0000
Subject: #48255 [Opn->Ver]: Mixing control structure syntaxes causes parse error
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-137262@lists.php.net to get a copy of this message
ID: 48255 Updated by: jani@php.net Reported By: faisun at sina dot com -Status: Open +Status: Verified Bug Type: Scripting Engine problem Operating System: * -PHP Version: 5.2.9 +PHP Version: 5.*, 6CVS (2009-05-12) Previous Comments: ------------------------------------------------------------------------ [2009-05-13 04:05:30] faisun at sina dot com Description: ------------ PHP Version: 5.2.9.2 <? if(2>1): echo "ABCD"; if(4>3){ echo "EFGH"; } else: echo "123456"; endif; ?> Result: Parse error: parse error in E:\wwwroot\1.php on line 5 <? if(2>1): echo "ABCD"; if(4>3){ echo "EFGH"; } else{} else: echo "123456"; endif; ?> Result:ABCDEFGH Reproduce code: --------------- <? if(2>1): echo "ABCD"; if(4>3){ echo "EFGH"; } else: echo "123456"; endif; ?> Expected result: ---------------- ABCDEFGH Actual result: -------------- Parse error: parse error in E:\wwwroot\1.php on line 5 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=48255&edit=1

« previous php.bugs (#137262) next »