summaryrefslogtreecommitdiff
path: root/Zend/tests/bug34062.phpt
blob: bcb4ad8c64c137fb01eb32a8908598b9a76f3ffb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--TEST--
Bug #34062 (Crash in catch block when many arguments are used)
--FILE--
<?php
function f1() { throw new Exception; }
function f2() { echo "here\n"; }

try {
      // Currently it's the minimum required number of zeros
      // If you remove one, it won't crash
	max(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, f1());
} catch (Exception $e) {
	echo "(((\n";
	f2(0, 0, 0); // Won't crash if less than 3 zeros here
	echo ")))\n";
}
?>
--EXPECT--
(((
here
)))