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.
 
 

30 lines
524 B

--TEST--
Native class: shutdown finalizers can use request-local dynamic call caches
--FILE--
<?php
function shutdown_dynamic_target(string $value): string
{
return 'finalizer:' . $value;
}
#[Native]
class ShutdownDynamicCaller
{
public function __destruct()
{
$callback = 'shutdown_dynamic_target';
echo $callback('ok') . "\n";
}
}
function main(): void
{
global $shutdownObject;
$shutdownObject = new ShutdownDynamicCaller();
echo "main\n";
}
?>
--EXPECT--
main
finalizer:ok