summaryrefslogtreecommitdiff
path: root/tests/lang/044.phpt
blob: 2e0479baee319cc5a05a418747707d8f875617db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--TEST--
Dynamic call for static methods dynamically named
--FILE--
<?php
class A {
    static function foo() { return 'foo'; }
}
$classname        =  'A';
$wrongClassname   =  'B';

$methodname       =  'foo';

echo $classname::$methodname()."\n";

echo $wrongClassname::$methodname()."\n";
?>
===DONE===
--EXPECTF--
foo

Fatal error: Uncaught EngineException: Class 'B' not found in %s044.php:%d
Stack trace:
#0 {main}
  thrown in %s044.php on line %d