#48255 [NEW]: if(): else: ERROR
| From: | faisun at sina dot com | Date: | Wed, 13 May 2009 04:05:30 +0000 |
| Subject: | #48255 [NEW]: if(): else: ERROR | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-137235@lists.php.net to get a copy of this message | ||
From: faisun at sina dot com
Operating system: Windows XP SP3
PHP version: 5.2.9
PHP Bug Type: Compile Failure
Bug description: if(): else: ERROR
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 bug report at http://bugs.php.net/?id=48255&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48255&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48255&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48255&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=48255&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48255&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=48255&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=48255&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=48255&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=48255&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=48255&r=support
Expected behavior: http://bugs.php.net/fix.php?id=48255&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=48255&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=48255&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=48255&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48255&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=48255&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=48255&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=48255&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=48255&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=48255&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=48255&r=mysqlcfg