3v4l.org

run code in 300+ PHP versions simultaneously
<?php $class = new ReflectionClass("ArrayObject"); $method = $class->getMethod("__construct"); foreach ($method->getParameters() as $param) { $value = $param->isDefaultValueAvailable() ? $param->getDefaultValue() : ($param->isOptional() ? null : "error"); print $param->name . " = " . var_export($value, true) . PHP_EOL; } new ArrayObject(null, null, null);
Output for git.master_jit, git.master, rfc.property-hooks
array = array ( ) flags = 0 iteratorClass = 'ArrayIterator' Fatal error: Uncaught TypeError: ArrayObject::__construct(): Argument #1 ($array) must be of type array, null given in /in/plOeU:11 Stack trace: #0 /in/plOeU(11): ArrayObject->__construct(NULL, NULL, NULL) #1 {main} thrown in /in/plOeU on line 11
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:
30.39 ms | 406 KiB | 5 Q