xref: /PHP-5.3/sapi/cgi/tests/004.phpt (revision a0370cd7)
1--TEST--
2execute a file with -f
3--SKIPIF--
4<?php
5include "skipif.inc";
6?>
7--FILE--
8<?php
9
10include "include.inc";
11
12$php = get_cgi_path();
13reset_env_vars();
14
15$filename = dirname(__FILE__).'/004.test.php';
16$code ='
17<?php
18
19class test {
20	private $pri;
21}
22
23var_dump(test::$pri);
24?>
25';
26
27file_put_contents($filename, $code);
28
29var_dump(`$php -n -f "$filename" 2>/dev/null`);
30var_dump(`$php -n -f "wrong"`);
31
32@unlink($filename);
33
34echo "Done\n";
35?>
36--EXPECTF--
37string(%d) "
38<br />
39<b>Fatal error</b>:  Cannot access private property test::$pri in <b>%s004.test.php</b> on line <b>8</b><br />
40"
41string(25) "No input file specified.
42"
43Done
44