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.
 
 

34 lines
475 B

--TEST--
Native class: GC finalization runs destructors from derived to base exactly once
--FILE--
<?php
#[Native]
class NativeDestructorBase
{
public function __destruct()
{
echo 'B';
}
}
#[Native]
class NativeDestructorChild extends NativeDestructorBase
{
public function __destruct()
{
echo 'C';
}
}
function main(): void
{
$value = new NativeDestructorChild();
$value = null;
echo "done\n";
}
?>
--EXPECT--
done
CB