summaryrefslogtreecommitdiff
path: root/Zend/tests/bug45910_2.phpt
blob: 68ca9a1176b011cd66af7d6e6ae0d81de7650c29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--TEST--
Bug #45910.2 (Cannot declare self-referencing constant)
--FILE--
<?php

class foo {
	const AAA = 'x';
	const BBB = 'a';
	const CCC = 'a';
	const DDD = self::AAA;

	private static $foo = array(
		self::BBB	=> 'a',
		self::CCC	=> 'b',
		self::DDD	=>  11
	);
	
	public static function test() {
		self::$foo;
	}
}

foo::test();

print 1;
?>
--EXPECT--
1