Annotation of embedaddon/php/Zend/tests/class_constants_004.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Testing constants (normal, namespace, class and interface)
3: --FILE--
4: <?php
5:
6: namespace foo;
7:
8: define('foo', 3);
9:
10: const foo = 1;
11:
12: class foo {
13: const foo = 2;
14: }
15:
16: interface Ifoo {
17: const foo = 4;
18: }
19:
20: $const = __NAMESPACE__ .'\\foo'; // class
21: $const2 = __NAMESPACE__ .'\\Ifoo'; // interface
22:
23: var_dump( foo,
24: \foo\foo,
25: namespace\foo,
26: \foo\foo::foo,
27: $const::foo,
28: \foo,
29: constant('foo'),
30: Ifoo::foo,
31: $const2::foo
32: );
33:
34: ?>
35: --EXPECT--
36: int(1)
37: int(1)
38: int(1)
39: int(2)
40: int(2)
41: int(3)
42: int(3)
43: int(4)
44: int(4)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>