3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo {} $f = function (Foo $foo) {}; $p = new ReflectionParameter($f, 0); var_dump($p->getType()->__toString());
Output for 7.2.0 - 7.2.33, 7.3.0 - 7.3.21, 8.0.0alpha1 - beta3
string(3) "Foo"
Output for 7.4.0 - 7.4.10
Deprecated: Function ReflectionType::__toString() is deprecated in /in/SsL0q on line 9 string(3) "Foo"