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.
32 lines
553 B
32 lines
553 B
--TEST--
|
|
std map: unset
|
|
--FILE--
|
|
<?php
|
|
function main() {
|
|
$map = std::map(complex_types::type_string, native_types::type_int);
|
|
$map["alpha"] = 10;
|
|
$map["beta"] = 20;
|
|
$map["gamma"] = 30;
|
|
|
|
foreach ($map as $k => $v) {
|
|
var_dump($k, $v);
|
|
}
|
|
unset($map["beta"]);
|
|
echo "unset-------------\n";
|
|
foreach ($map as $k => $v) {
|
|
var_dump($k, $v);
|
|
}
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
string(5) "alpha"
|
|
int(10)
|
|
string(4) "beta"
|
|
int(20)
|
|
string(5) "gamma"
|
|
int(30)
|
|
unset-------------
|
|
string(5) "alpha"
|
|
int(10)
|
|
string(5) "gamma"
|
|
int(30)
|