mirror of
https://github.com/php/php-src.git
synced 2025-01-16 16:54:41 +08:00
21 lines
300 B
PHP
21 lines
300 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: Class 'B' not found in %s041.php on line %d
|