blob: 58457bbce301f6be09665ace0a11b19e8b66bf26 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
--TEST--
Dynamic call for static methods
--FILE--
<?php
class A {
static function foo() { return 'foo'; }
}
$classname = 'A';
$wrongClassname = 'B';
echo $classname::foo()."\n";
echo $wrongClassname::foo()."\n";
?>
===DONE===
--EXPECTF--
foo
Fatal error: Uncaught EngineException: Class 'B' not found in %s043.php:%d
Stack trace:
#0 {main}
thrown in %s043.php on line %d
|