-
Notifications
You must be signed in to change notification settings - Fork 8k
Expand file tree
/
Copy path004.phpt
More file actions
46 lines (39 loc) · 1.08 KB
/
004.phpt
File metadata and controls
46 lines (39 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
--TEST--
show information about function
--SKIPIF--
<?php
include "skipif.inc";
?>
--FILE--
<?php
$php = getenv('TEST_PHP_EXECUTABLE_ESCAPED');
var_dump(shell_exec("$php -n --rf unknown"));
var_dump(shell_exec("$php -n --rf echo"));
var_dump(shell_exec("$php -n --rf phpinfo"));
// Regression tests for https://github.com/php/php-src/issues/21754
var_dump(shell_exec("$php -n --rf ReflectionMethod::__construct"));
var_dump(shell_exec("$php -n --rf ReflectionMethod::missing"));
echo "Done\n";
?>
--EXPECT--
string(45) "Exception: Function unknown() does not exist
"
string(42) "Exception: Function echo() does not exist
"
string(155) "Function [ <internal:standard> function phpinfo ] {
- Parameters [1] {
Parameter #0 [ <optional> int $flags = INFO_ALL ]
}
- Return [ true ]
}
"
string(213) "Method [ <internal:Reflection, ctor> public method __construct ] {
- Parameters [2] {
Parameter #0 [ <required> object|string $objectOrMethod ]
Parameter #1 [ <optional> ?string $method = null ]
}
}
"
string(61) "Exception: Method ReflectionMethod::missing() does not exist
"
Done