xref: /PHP-5.6/Zend/tests/lsb_014.phpt (revision 7126de49)
1--TEST--
2ZE2 Late Static Binding access to static::const through defined() and get_constant()
3--FILE--
4<?php
5
6class Test1 {
7	static function test() {
8		var_dump(defined("static::ok"));
9		if (defined("static::ok")) {
10			echo constant("static::ok");
11		}
12	}
13}
14
15class Test2 extends Test1 {
16	const ok = "ok";
17}
18Test1::test();
19Test2::test();
20?>
21--EXPECT--
22bool(false)
23bool(true)
24ok
25