3v4l.org

run code in 300+ PHP versions simultaneously
<?php class SomeClass { protected stdClass $a; } $type = (new \ReflectionClass(SomeClass::class))->getProperty('a')->getType(); var_dump($type->isBuiltin());
Output for 7.4.0 - 7.4.13, 8.0.0
bool(false)
Output for 7.2.0 - 7.2.34, 7.3.0 - 7.3.24
Parse error: syntax error, unexpected 'stdClass' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) in /in/TGkX2 on line 4
Process exited with code 255.