Edit report at http://bugs.php.net/bug.php?id=48255&edit=1
ID: 48255
Comment by: whatrevolution at yahoo dot com
Reported by: faisun at sina dot com
Summary: Mixing control structure syntaxes causes parse error
Status: Verified
Type: Bug
Package: Scripting Engine problem
Operating System: *
PHP Version: 5.*, 6CVS (2009-05-12)
New Comment:
Bug OP test, result:
( ! ) Parse error: syntax error, unexpected ':' in
/var/www/php_bugs/mixed_control_structure.php on line 5
PHP Version 5.2.10-2ubuntu6.4
System Linux 2.6.31-20-generic x86_64
Build Date Jan 6 2010 22:36:47
Server API Apache 2.0 Handler
PHP API 20041225
PHP Extension 20060613
Zend Extension 220060519
Debug Build no
Thread Safety disabled
Zend Memory Manager enabled
Apache/2.2.12 (Ubuntu)
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/bug.php?id=48255&edit=1