3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public stdClass $prop; } $rp = new ReflectionProperty(Test::class, 'prop'); $test = new Test; $test->prop = new stdClass; var_dump($rp->getType()->getName());

preferences:
26.24 ms | 404 KiB | 5 Q