mirror of
https://github.com/php/php-src.git
synced 2024-11-26 19:33:55 +08:00
d30cd7d7e7
Closes GH-5590
24 lines
357 B
PHP
24 lines
357 B
PHP
--TEST--
|
|
Dynamic access of static members
|
|
--FILE--
|
|
<?php
|
|
class A {
|
|
public static $b = 'foo';
|
|
}
|
|
|
|
$classname = 'A';
|
|
$wrongClassname = 'B';
|
|
|
|
echo $classname::$b."\n";
|
|
echo $wrongClassname::$b."\n";
|
|
|
|
?>
|
|
===DONE===
|
|
--EXPECTF--
|
|
foo
|
|
|
|
Fatal error: Uncaught Error: Class "B" not found in %s:%d
|
|
Stack trace:
|
|
#0 {main}
|
|
thrown in %s041.php on line %d
|