mirror of
https://github.com/php/php-src.git
synced 2024-11-25 02:44:58 +08:00
22 lines
380 B
Plaintext
22 lines
380 B
Plaintext
|
--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
|