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.
 
 

22 lines
388 B

--TEST--
Symfony pattern: arrow function throw expression
--ENV--
USE_ZEND_ALLOC=0
--FILE--
<?php
function main(): void
{
$handler = static fn () => throw new RuntimeException('failed');
try {
$handler();
} catch (Throwable $e) {
var_dump($e::class);
var_dump($e->getMessage());
}
}
?>
--EXPECT--
string(16) "RuntimeException"
string(6) "failed"