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: Uncaught Error: Class 'B' not found in %s044.php:%d 22Stack trace: 23#0 {main} 24 thrown in %s044.php on line %d 25