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.
 
 

19 lines
377 B

--TEST--
Test constants with default values based on other constants.
--SKIPIF--
<?php die('skip, failed at compile time'); ?>
--FILE--
<?php
class C
{
const CONST_2 = self::CONST_1;
const CONST_1 = self::BASE_CONST;
const BASE_CONST = 'hello';
}
function main() {
var_dump(C::CONST_1, C::CONST_2);
}
?>
--EXPECT--
string(5) "hello"
string(5) "hello"