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