xref: /PHP-5.6/tests/lang/044.phpt (revision 9483a2ff)
1--TEST--
2Dynamic call for static methods dynamically named
3--FILE--
4<?php
5class A {
6    static function foo() { return 'foo'; }
7}
8$classname        =  'A';
9$wrongClassname   =  'B';
10
11$methodname       =  'foo';
12
13echo $classname::$methodname()."\n";
14
15echo $wrongClassname::$methodname()."\n";
16?>
17===DONE===
18--EXPECTF--
19foo
20
21Fatal error: Class 'B' not found in %s044.php on line %d
22