summaryrefslogtreecommitdiff
path: root/tests/lang/041.phpt
blob: 72ab0e4a62e5a5beec154c7c041e2218f3d75c9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--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 exception 'EngineException' with message 'Class 'B' not found' in %s041.php:%d
Stack trace:
#0 {main}
  thrown in %s041.php on line %d