summaryrefslogtreecommitdiff
path: root/tests/lang/bug29944.phpt
blob: 7882936f08b8d78e8cb19989969cf7382c3f2e4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--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===