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.
24 lines
395 B
24 lines
395 B
--TEST--
|
|
std array: assign to PHP array
|
|
--FILE--
|
|
<?php
|
|
function main() {
|
|
$array = std::array(native_types::type_int, 3);
|
|
$array[0] = 10;
|
|
$array[1] = 20;
|
|
$array[2] = 30;
|
|
|
|
$copy = $array;
|
|
var_dump(is_array($copy));
|
|
var_dump(count($copy));
|
|
var_dump($copy[0]);
|
|
var_dump($copy[1]);
|
|
var_dump($copy[2]);
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
bool(true)
|
|
int(3)
|
|
int(10)
|
|
int(20)
|
|
int(30)
|
|
|