PHP 4.0 Bug #8582: normal if nested in alternate if gives parse error

From: Date: Mon, 08 Jan 2001 01:09:41 +0000
Subject: PHP 4.0 Bug #8582: normal if nested in alternate if gives parse error
Groups: php.dev 
Request: Send a blank email to php-dev+get-43305@lists.php.net to get a copy of this message
From: wojas@vvtp.nl Operating system: Linux PHP version: 4.0.3pl1 PHP Bug Type: Scripting Engine problem Bug description: normal if nested in alternate if gives parse error The following php code gives a parse error at the 'else:' <?php if(1==1): echo "ok so far<p>"; if(1==1) echo "error here!"; else: echo "Not possible"; endif; ?> It looks like php thinks the 'else:' is part of the second if construct; the following code works: <?php if(1==1): echo "ok so far<p>"; if(1==1) echo "error here!"; echo "void"; else: echo "Not possible"; endif; ?> Tested with 4.0.3pl1, 4.0.4RC3 and 3.0.18 on debian woody and potato. -- Edit Bug report at: http://bugs.php.net/?id=8582&edit=1

« previous php.dev (#43305) next »