3v4l.org

run code in 300+ PHP versions simultaneously
<?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()]); } } }
Output for git.master, git.master_jit, rfc.property-hooks
string(11) "__construct" array(2) { [0]=> string(5) "array" [1]=> array(0) { } } array(2) { [0]=> string(5) "array" [1]=> array(0) { } } string(11) "__construct" array(2) { [0]=> string(5) "flags" [1]=> int(0) } array(2) { [0]=> string(5) "flags" [1]=> int(0) } string(12) "offsetExists" Fatal error: Uncaught ReflectionException: Internal error: Failed to retrieve the default value 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.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
66.56 ms | 401 KiB | 8 Q