mirror of
https://github.com/php/php-src.git
synced 2025-01-22 19:54:13 +08:00
- New test
This commit is contained in:
parent
9dda408624
commit
1152c18e2a
28
Zend/tests/bug45910_2.phpt
Normal file
28
Zend/tests/bug45910_2.phpt
Normal file
@ -0,0 +1,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
|
Loading…
Reference in New Issue
Block a user