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.
27 lines
491 B
27 lines
491 B
<?php
|
|
|
|
use native_types;
|
|
|
|
class NativeMethodUnsetKeepsOptimization
|
|
{
|
|
public int $value = 7;
|
|
|
|
public function read(): int
|
|
{
|
|
return $this->value;
|
|
}
|
|
}
|
|
|
|
function nativeMethodUnsetKeepsOptimization(int $branch): int
|
|
{
|
|
$object = new NativeMethodUnsetKeepsOptimization();
|
|
if ($branch === 1) {
|
|
unset($object);
|
|
} elseif ($branch === 2) {
|
|
var_dump($object->value);
|
|
} else {
|
|
var_dump($object->value);
|
|
}
|
|
|
|
return $object->read();
|
|
}
|
|
|