TypePHP 编译器 https://swoole.com/aot/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

33 lines
477 B

--TEST--
Bug #23384 (use of class constants in statics)
--FILE--
<?php
class Foo {
const HUN = 100;
static function test($x = Foo::HUN) {
static $arr2 = array(TEN => 'ten');
static $arr = array(Foo::HUN => 'ten');
print_r($arr);
print_r($arr2);
print_r($x);
}
}
function main() {
define('TEN', 10);
Foo::test();
echo Foo::HUN . "\n";
}
?>
--EXPECT--
Array
(
[100] => ten
)
Array
(
[10] => ten
)
100100