@@ -14,7 +14,7 @@ function run_and_output($cmd) {
14
14
}
15
15
exec ($ cmd , $ output , $ exit_code );
16
16
print_r ($ output );
17
- var_dump ($ exit_code == 0 );
17
+ var_dump ($ exit_code );
18
18
}
19
19
20
20
$ php = get_cgi_path ();
@@ -33,9 +33,6 @@ echo "hi";
33
33
34
34
file_put_contents ($ filename_good , $ code );
35
35
36
- run_and_output ("$ php -n -l $ filename_good_escaped $ filename_good_escaped " );
37
- run_and_output ("$ php -n -l $ filename_good_escaped some.unknown $ filename_good_escaped " );
38
-
39
36
$ code = '
40
37
<?php
41
38
@@ -48,6 +45,8 @@ class test
48
45
49
46
file_put_contents ($ filename_bad , $ code );
50
47
48
+ run_and_output ("$ php -n -l $ filename_good_escaped $ filename_good_escaped " );
49
+ run_and_output ("$ php -n -l $ filename_good_escaped some.unknown $ filename_good_escaped " );
51
50
run_and_output ("$ php -n -l $ filename_good_escaped $ filename_bad_escaped $ filename_good_escaped " );
52
51
run_and_output ("$ php -n -l $ filename_bad_escaped $ filename_bad_escaped " );
53
52
run_and_output ("$ php -n -l $ filename_bad_escaped some.unknown $ filename_bad_escaped " );
@@ -66,13 +65,13 @@ Array
66
65
[0] => No syntax errors detected in %s012_good.test.php
67
66
[1] => No syntax errors detected in %s012_good.test.php
68
67
)
69
- bool(true )
68
+ int(0 )
70
69
Array
71
70
(
72
71
[0] => No syntax errors detected in %s012_good.test.php
73
72
[1] => No input file specified.
74
73
)
75
- bool(false )
74
+ int(255 )
76
75
Array
77
76
(
78
77
[0] => No syntax errors detected in %s012_good.test.php
81
80
[3] => Errors parsing %s012_bad.test.php
82
81
[4] => No syntax errors detected in %s012_good.test.php
83
82
)
84
- bool(false )
83
+ int(255 )
85
84
Array
86
85
(
87
86
[0] => <br />
@@ -91,15 +90,15 @@ Array
91
90
[4] => <b>Parse error</b>: syntax error, unexpected token "private", expecting "{" in <b>%s012_bad.test.php</b> on line <b>5</b><br />
92
91
[5] => Errors parsing %s012_bad.test.php
93
92
)
94
- bool(false )
93
+ int(255 )
95
94
Array
96
95
(
97
96
[0] => <br />
98
97
[1] => <b>Parse error</b>: syntax error, unexpected token "private", expecting "{" in <b>%s012_bad.test.php</b> on line <b>5</b><br />
99
98
[2] => Errors parsing %s012_bad.test.php
100
99
[3] => No input file specified.
101
100
)
102
- bool(false )
101
+ int(255 )
103
102
Array
104
103
(
105
104
[0] => <br />
@@ -110,5 +109,5 @@ Array
110
109
[5] => Errors parsing %s012_bad.test.php
111
110
[6] => No input file specified.
112
111
)
113
- bool(false )
112
+ int(255 )
114
113
Done
0 commit comments