Bug #52775 [Opn->Bgs]: Parse error of <?php switch ($a) : ?>
| From: | johannes@php.net | Date: | Sat, 04 Sep 2010 12:19:02 +0000 |
| Subject: | Bug #52775 [Opn->Bgs]: Parse error of <?php switch ($a) : ?> | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-154087@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=52775&edit=1
ID: 52775
Updated by: johannes@php.net
Reported by: yutaka dot nakadouzono at gmail dot com
Summary: Parse error of <?php switch ($a) : ?>
-Status: Open
+Status: Bogus
Type: Bug
Package: Compile Failure
Operating System: FreeBSD
PHP Version: 5.2.14
Block user comment: N
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
<?php switch ($a) : ?> <?php case 1: ?>
is essentially the same as
<?php switch ($a) : echo " "; case 1: ?>
which obviously is wrong.
Previous Comments:
------------------------------------------------------------------------
[2010-09-04 06:47:53] yutaka dot nakadouzono at gmail dot com
Description:
------------
space of bitween switch and case make parse error.
PHP version:5.2.13
Test script:
---------------
## Success ###########
<?php $a = 1; ?><?php switch ($a) : ?><?php case 1: ?>1<?php break;
?><?php endswitch; ?>
## Error ###########
<?php $a = 1; ?><?php switch ($a) : ?> <?php case 1: ?>1<?php break;
?><?php endswitch; ?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=52775&edit=1