Bug #18483: include fails in a switch context
| From: | nielsene at mit dot edu | Date: | Tue, 23 Jul 2002 02:46:08 +0000 |
| Subject: | Bug #18483: include fails in a switch context | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-14850@lists.php.net to get a copy of this message | ||
From: nielsene@mit.edu
Operating system: Linux
PHP version: 4.1.2
PHP Bug Type: Scripting Engine problem
Bug description: include fails in a switch context
Using an include (or require) from within a switch statement, generates a
parse error (expecting T_CASE or T_DEFAULT).
--test.php
<?php
$foo=1;
switch($foo)
{
include "bar.inc";
}
exit;
?>
--bar.inc
<?php
case 1: echo "1"; break;
case 2: echo "2"; break;
default : echo "3"; break;
?>
--
--
Edit bug report at http://bugs.php.net/?id=18483&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=18483&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=18483&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=18483&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=18483&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=18483&r=support
Expected behavior: http://bugs.php.net/fix.php?id=18483&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=18483&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=18483&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=18483&r=globals