1--TEST--
2proc_open() with > 16 pipes
3--FILE--
4<?php
5
6include dirname(__FILE__) . "/proc_open_pipes.inc";
7
8for ($i = 3; $i<= 30; $i++) {
9	$spec[$i] = array('pipe', 'w');
10}
11
12$php = getenv("TEST_PHP_EXECUTABLE");
13$callee = create_sleep_script();
14proc_open("$php -n $callee", $spec, $pipes);
15
16var_dump(count($spec));
17var_dump($pipes);
18
19?>
20--CLEAN--
21<?php
22include dirname(__FILE__) . "/proc_open_pipes.inc";
23
24unlink_sleep_script();
25
26?>
27--EXPECTF--
28int(28)
29array(28) {
30  [3]=>
31  resource(%d) of type (Unknown)
32  [4]=>
33  resource(%d) of type (Unknown)
34  [5]=>
35  resource(%d) of type (Unknown)
36  [6]=>
37  resource(%d) of type (Unknown)
38  [7]=>
39  resource(%d) of type (Unknown)
40  [8]=>
41  resource(%d) of type (Unknown)
42  [9]=>
43  resource(%d) of type (Unknown)
44  [10]=>
45  resource(%d) of type (Unknown)
46  [11]=>
47  resource(%d) of type (Unknown)
48  [12]=>
49  resource(%d) of type (Unknown)
50  [13]=>
51  resource(%d) of type (Unknown)
52  [14]=>
53  resource(%d) of type (Unknown)
54  [15]=>
55  resource(%d) of type (Unknown)
56  [16]=>
57  resource(%d) of type (Unknown)
58  [17]=>
59  resource(%d) of type (Unknown)
60  [18]=>
61  resource(%d) of type (Unknown)
62  [19]=>
63  resource(%d) of type (Unknown)
64  [20]=>
65  resource(%d) of type (Unknown)
66  [21]=>
67  resource(%d) of type (Unknown)
68  [22]=>
69  resource(%d) of type (Unknown)
70  [23]=>
71  resource(%d) of type (Unknown)
72  [24]=>
73  resource(%d) of type (Unknown)
74  [25]=>
75  resource(%d) of type (Unknown)
76  [26]=>
77  resource(%d) of type (Unknown)
78  [27]=>
79  resource(%d) of type (Unknown)
80  [28]=>
81  resource(%d) of type (Unknown)
82  [29]=>
83  resource(%d) of type (Unknown)
84  [30]=>
85  resource(%d) of type (Unknown)
86}
87