diff options
Diffstat (limited to 'tests/lang/044.phpt')
-rw-r--r-- | tests/lang/044.phpt | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/lang/044.phpt b/tests/lang/044.phpt new file mode 100644 index 0000000..a0de889 --- /dev/null +++ b/tests/lang/044.phpt @@ -0,0 +1,21 @@ +--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: Class 'B' not found in %s044.php on line %d |