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.
25 lines
383 B
25 lines
383 B
--TEST--
|
|
std ordered_map: same type copy
|
|
--FILE--
|
|
<?php
|
|
function main() {
|
|
$a = std::ordered_map(Type::Int, Type::Int);
|
|
$b = std::ordered_map(Type::Int, Type::Int);
|
|
|
|
$b[10] = 100;
|
|
$b[20] = 200;
|
|
$a = $b;
|
|
|
|
var_dump(count($a));
|
|
var_dump($a[10]);
|
|
var_dump($a[20]);
|
|
|
|
$a[10] = 999;
|
|
var_dump($b[10]);
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
int(2)
|
|
int(100)
|
|
int(200)
|
|
int(100)
|
|
|