php-src/tests/lang/bug29944.phpt
Fabien Villepinte a555cc0b3d Clean DONE tags from tests
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.

Closes GH-4872.
2019-11-07 21:31:47 +01:00

19 lines
242 B
PHP

--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);
}
?>
--EXPECT--
1