3v4l.org

run code in 300+ PHP versions simultaneously
<?php function map(?callable $transformer, iterable ... $inputs): iterable { // for now I just care how named parameters work var_dump($inputs); return \array_map($transformer, ...$inputs); } map(transformer: null, inputs: [[1, 2], [3, 4]]);
Output for git.master, git.master_jit, rfc.property-hooks
array(1) { ["inputs"]=> array(2) { [0]=> array(2) { [0]=> int(1) [1]=> int(2) } [1]=> array(2) { [0]=> int(3) [1]=> int(4) } } } Fatal error: Uncaught ArgumentCountError: array_map() expects at least 2 arguments, 1 given in /in/sSVTZ:6 Stack trace: #0 /in/sSVTZ(6): array_map(NULL, inputs: Array) #1 /in/sSVTZ(10): map(NULL, inputs: Array) #2 {main} thrown in /in/sSVTZ on line 6
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:
106.87 ms | 406 KiB | 5 Q