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
363 B
21 lines
363 B
--TEST--
|
|
std vector compound assignment evaluates its offset before the RHS
|
|
--FILE--
|
|
<?php
|
|
function main(): void
|
|
{
|
|
$index = 0;
|
|
$vector = std::vector(Type::Int, 2);
|
|
$vector[0] = 10;
|
|
$vector[1] = 20;
|
|
|
|
$result = ($vector[$index] += ++$index);
|
|
|
|
var_dump($index, $vector[0], $vector[1], $result);
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
int(1)
|
|
int(11)
|
|
int(20)
|
|
int(11)
|
|
|