3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class C { function foo(T $t) {} } $r = new ReflectionClass('C'); $m = $r->getMethod('foo'); $p = $m->getParameters(); $c = $p[0]->getClass(); var_export($c);
based on cQM4a
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught ReflectionException: Class T does not exist in /in/aHUHU:10 Stack trace: #0 /in/aHUHU(10): ReflectionParameter->getClass() #1 {main} thrown in /in/aHUHU on line 10
Process exited with code 255.
Output for 5.3.20 - 5.6.28
Fatal error: Uncaught exception 'ReflectionException' with message 'Class T does not exist' in /in/aHUHU:10 Stack trace: #0 /in/aHUHU(10): ReflectionParameter->getClass() #1 {main} thrown in /in/aHUHU on line 10
Process exited with code 255.