#29304 [Opn->Bgs]: Parse error with "switch" and html code
| From: | iliaa@php.net | Date: | Wed, 21 Jul 2004 14:37:13 +0000 |
| Subject: | #29304 [Opn->Bgs]: Parse error with "switch" and html code | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-63260@lists.php.net to get a copy of this message | ||
ID: 29304
Updated by: iliaa@php.net
Reported By: devis at witcom dot com
-Status: Open
+Status: Bogus
Bug Type: Compile Failure
Operating System: Linux Debian
PHP Version: 4.3.7
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Read Zeev's response to the original bug report.
Previous Comments:
------------------------------------------------------------------------
[2004-07-21 16:17:38] devis at witcom dot com
Description:
------------
Bug #11447 REOPENED
when ther is html code between "switch" and the first "case" php
reports this error: "Parse error: parse error, expecting `T_ENDSWITCH'
or
T_CASE' or T_DEFAULT'"
the problem occurs while indenting html+php code:
<html>
<body>
<?switch ($a):?>
<?case 0: echo "zero"; break;?>
<?default: echo "one"; break;?>
<?endswitch;?>
</body>
</html>
Reproduce code:
---------------
THIS WORKS:
<html>
<?switch ($a):?>
<?case 0: echo "zero"; break;?>
<?default: echo "one"; break;?>
<?endswitch;?>
</html>
THIS DOESN'T WORK:
<html>
<?switch ($a):?>
[space]<?case 0: echo "zero"; break;?>
<?default: echo "one"; break;?>
<?endswitch;?>
</html>
Expected result:
----------------
"zero"
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29304&edit=1