3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $rc = new ReflectionClass('ArrayIterator'); foreach ($rc->getMethods() as $method) { if ($method->isAbstract() || $method->isStatic()) continue; foreach ($method->getParameters() as $param) { var_dump($method->name); foreach ($method->getParameters() as $paramt) { var_dump([$param->name, $param->getDefaultValue()]); } } }
based on WCKXm
Output for 7.0.0 - 7.2.0
string(11) "__construct" Fatal error: Uncaught ReflectionException: Cannot determine default value for internal functions in /in/7JL83:16 Stack trace: #0 /in/7JL83(16): ReflectionParameter->getDefaultValue() #1 {main} thrown in /in/7JL83 on line 16
Process exited with code 255.
Output for 5.4.2 - 5.6.28
string(11) "__construct" Fatal error: Uncaught exception 'ReflectionException' with message 'Cannot determine default value for internal functions' in /in/7JL83:16 Stack trace: #0 /in/7JL83(16): ReflectionParameter->getDefaultValue() #1 {main} thrown in /in/7JL83 on line 16
Process exited with code 255.
Output for 5.3.17 - 5.3.29
Parse error: syntax error, unexpected '[', expecting ')' in /in/7JL83 on line 16
Process exited with code 255.