Annotation of embedaddon/php/Zend/tests/lsb_014.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: ZE2 Late Static Binding access to static::const through defined() and get_constant()
3: --FILE--
4: <?php
5:
6: class 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:
15: class Test2 extends Test1 {
16: const ok = "ok";
17: }
18: Test1::test();
19: Test2::test();
20: ?>
21: --EXPECT--
22: bool(false)
23: bool(true)
24: ok
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>