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

--TEST--
Test ?? operator
--FILE--
<?php
function f($x)
{
printf("%s(%d)\n", __FUNCTION__, $x);
return $x;
}
function main() {
$a = f(null) ?? f(2);
var_dump($a);
$a = f(1) ?? f(2);
var_dump($a);
}
?>
--EXPECT--
f(0)
f(2)
int(2)
f(1)
int(1)