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.
36 lines
418 B
36 lines
418 B
--TEST--
|
|
class const 002
|
|
--FILE--
|
|
<?php
|
|
class Worker
|
|
{
|
|
public const FOO = [
|
|
'php',
|
|
'java',
|
|
'c++',
|
|
'golang',
|
|
];
|
|
}
|
|
|
|
class Worker2 extends Worker {
|
|
|
|
}
|
|
|
|
function main()
|
|
{
|
|
var_dump(Worker2::FOO);
|
|
var_dump(Worker2::FOO[2]);
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
array(4) {
|
|
[0]=>
|
|
string(3) "php"
|
|
[1]=>
|
|
string(4) "java"
|
|
[2]=>
|
|
string(3) "c++"
|
|
[3]=>
|
|
string(6) "golang"
|
|
}
|
|
string(3) "c++"
|