php-src/tests/lang/bug29944.phpt
2004-09-02 06:36:35 +00:00

21 lines
266 B
PHP
Executable File

--TEST--
Bug #29944 (function defined in switch crashes PHP)
--FILE--
<?PHP
$a = 1;
$b = "1";
switch ($a) {
case 1:
function foo($bar) {
if (preg_match('/\d/', $bar)) return true;
return false;
}
echo foo($b);
}
?>
===DONE===
--EXPECT--
1
===DONE===