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.
28 lines
444 B
28 lines
444 B
--TEST--
|
|
Native class: unset and null clear only the local pointer slot
|
|
--FILE--
|
|
<?php
|
|
|
|
#[Native]
|
|
class NativeAliasValue
|
|
{
|
|
public int $value = 42;
|
|
}
|
|
|
|
function main(): void
|
|
{
|
|
$first = new NativeAliasValue();
|
|
$alias = $first;
|
|
unset($first);
|
|
var_dump($first === null, $alias->value);
|
|
|
|
$second = $alias;
|
|
$alias = null;
|
|
var_dump($alias === null, $second->value);
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
bool(true)
|
|
int(42)
|
|
bool(true)
|
|
int(42)
|
|
|