- Output for 8.0.1 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
- bool(false)
- Output for 7.4.0 - 7.4.33
- Parse error: syntax error, unexpected 'static' (T_STATIC) in /in/9pBvi on line 5
Process exited with code 255.
<?php
class A
{
public function f(): static
{
}
}
var_dump((new ReflectionMethod('A', 'f'))->getReturnType()->isBuiltin());