From: ennixo at free dot fr
Operating system: Windows XP
PHP version: 5.0.2
PHP Bug Type: Reproducible crash
Bug description: Apache crashes when calling a function declared in a "case"
and with global var
Description:
------------
Apache crashes when calling a php function declared in a case statement
and with a global variable.
Reproduce code:
---------------
$a = 1;
switch ($a)
{
case 1:
function test ()
{
global $plop;
echo "test $plop";
}
$plop = "(bis)";
test();
break;
}
Expected result:
----------------
"test (bis)"
Actual result:
--------------
apache crashes.
just move the function outside the switch and it will work.
--
Edit bug report at http://bugs.php.net/?id=32126&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32126&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=32126&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=32126&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=32126&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=32126&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=32126&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=32126&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=32126&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=32126&r=support
Expected behavior: http://bugs.php.net/fix.php?id=32126&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=32126&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=32126&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=32126&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32126&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=32126&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=32126&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=32126&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=32126&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=32126&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=32126&r=mysqlcfg