@@ -51,11 +51,11 @@ TEMPLATE;
51
51
$ php = getenv ('TEST_PHP_EXECUTABLE_ESCAPED ' );
52
52
$ command = $ php . ' --no-php-ini ' . escapeshellarg (FILE_PATH );
53
53
54
- foreach ([FILE_CONTENT , str_replace ('exit ' , 'die ' , FILE_CONTENT )] as $ code ) {
54
+ foreach ([FILE_CONTENT , str_replace ('exit ' , 'die ' , FILE_CONTENT )] as $ status ) {
55
55
foreach ($ values as $ value ) {
56
56
echo 'Using ' , zend_test_var_export ($ value ), ' as value: ' , PHP_EOL ;
57
57
$ output = [];
58
- $ content = str_replace ('VALUE ' , zend_test_var_export ($ value ), $ code );
58
+ $ content = str_replace ('VALUE ' , zend_test_var_export ($ value ), $ status );
59
59
file_put_contents (FILE_PATH , $ content );
60
60
exec ($ command , $ output , $ exit_status );
61
61
echo 'Exit status is: ' , $ exit_status , PHP_EOL ,
@@ -64,7 +64,7 @@ foreach ([FILE_CONTENT, str_replace('exit', 'die', FILE_CONTENT)] as $code) {
64
64
65
65
echo 'As a statement: ' , PHP_EOL ;
66
66
$ output = [];
67
- $ content = str_replace ('(VALUE) ' , '' , $ code );
67
+ $ content = str_replace ('(VALUE) ' , '' , $ status );
68
68
exec ($ command , $ output , $ exit_status );
69
69
echo 'Exit status is: ' , $ exit_status , PHP_EOL ,
70
70
'Output is: ' , PHP_EOL , join ($ output ), PHP_EOL ;
@@ -80,7 +80,7 @@ const FILE_PATH = __DIR__ . '/exit_values_test.php';
80
80
Using NULL as value:
81
81
Exit status is: 0
82
82
Output is:
83
- Deprecated: exit(): Passing null to parameter #1 ($code ) of type string|int is deprecated in %s on line %d
83
+ Deprecated: exit(): Passing null to parameter #1 ($status ) of type string|int is deprecated in %s on line %d
84
84
Using false as value:
85
85
Exit status is: 0
86
86
Output is:
@@ -116,23 +116,23 @@ Hello world
116
116
Using [] as value:
117
117
Exit status is: 0
118
118
Output is:
119
- TypeError: exit(): Argument #1 ($code ) must be of type string|int, array given
119
+ TypeError: exit(): Argument #1 ($status ) must be of type string|int, array given
120
120
Using STDERR as value:
121
121
Exit status is: 0
122
122
Output is:
123
- TypeError: exit(): Argument #1 ($code ) must be of type string|int, resource given
123
+ TypeError: exit(): Argument #1 ($status ) must be of type string|int, resource given
124
124
Using new stdClass() as value:
125
125
Exit status is: 0
126
126
Output is:
127
- TypeError: exit(): Argument #1 ($code ) must be of type string|int, stdClass given
127
+ TypeError: exit(): Argument #1 ($status ) must be of type string|int, stdClass given
128
128
As a statement:
129
129
Exit status is: 0
130
130
Output is:
131
- TypeError: exit(): Argument #1 ($code ) must be of type string|int, stdClass given
131
+ TypeError: exit(): Argument #1 ($status ) must be of type string|int, stdClass given
132
132
Using NULL as value:
133
133
Exit status is: 0
134
134
Output is:
135
- Deprecated: exit(): Passing null to parameter #1 ($code ) of type string|int is deprecated in %s on line %d
135
+ Deprecated: exit(): Passing null to parameter #1 ($status ) of type string|int is deprecated in %s on line %d
136
136
Using false as value:
137
137
Exit status is: 0
138
138
Output is:
@@ -168,16 +168,16 @@ Hello world
168
168
Using [] as value:
169
169
Exit status is: 0
170
170
Output is:
171
- TypeError: exit(): Argument #1 ($code ) must be of type string|int, array given
171
+ TypeError: exit(): Argument #1 ($status ) must be of type string|int, array given
172
172
Using STDERR as value:
173
173
Exit status is: 0
174
174
Output is:
175
- TypeError: exit(): Argument #1 ($code ) must be of type string|int, resource given
175
+ TypeError: exit(): Argument #1 ($status ) must be of type string|int, resource given
176
176
Using new stdClass() as value:
177
177
Exit status is: 0
178
178
Output is:
179
- TypeError: exit(): Argument #1 ($code ) must be of type string|int, stdClass given
179
+ TypeError: exit(): Argument #1 ($status ) must be of type string|int, stdClass given
180
180
As a statement:
181
181
Exit status is: 0
182
182
Output is:
183
- TypeError: exit(): Argument #1 ($code ) must be of type string|int, stdClass given
183
+ TypeError: exit(): Argument #1 ($status ) must be of type string|int, stdClass given
0 commit comments