summaryrefslogtreecommitdiff
path: root/Zend/tests/bug45910.phpt
blob: 1041877fee30cebabd44dd9faff5c7535c9773bd (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 (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	=>  self::AAA
	);
	
	public static function test() {
		self::$foo;
	}
}

foo::test();

print 1;
?>
--EXPECT--
1