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
532 B

--TEST--
$GLOBALS array assignment and reference parameter update global slot
--FILE--
<?php
function globals_assign_ref_inc(&$value): void
{
$value++;
}
function main(): void
{
$GLOBALS['aot_globals_assign_ref_value'] = 40;
$GLOBALS['aot_globals_assign_ref_value'] += 1;
globals_assign_ref_inc($GLOBALS['aot_globals_assign_ref_value']);
global $aot_globals_assign_ref_value;
var_dump($aot_globals_assign_ref_value);
var_dump($GLOBALS['aot_globals_assign_ref_value']);
}
?>
--EXPECT--
int(42)
int(42)