3v4l.org

run code in 300+ PHP versions simultaneously
<?php $insertData = [ [ 'test' => '1', 'test1' => '2', ], [ 'test' => '3', 'test1' => '4', ] ]; $values = array_map(fn (array $row) => array_push($values, ...array_values($row)), $insertData); var_dump( ($values), );
Output for git.master_jit, git.master
Fatal error: Uncaught TypeError: array_push(): Argument #1 ($array) must be of type array, null given in /in/ef86V:14 Stack trace: #0 /in/ef86V(14): array_push(NULL, '1', '2') #1 [internal function]: {closure:/in/ef86V:14}(Array) #2 /in/ef86V(14): array_map(Object(Closure), Array) #3 {main} thrown in /in/ef86V on line 14
Process exited with code 255.
Output for rfc.property-hooks
Fatal error: Uncaught TypeError: array_push(): Argument #1 ($array) must be of type array, null given in /in/ef86V:14 Stack trace: #0 /in/ef86V(14): array_push(NULL, '1', '2') #1 [internal function]: {closure}(Array) #2 /in/ef86V(14): array_map(Object(Closure), Array) #3 {main} thrown in /in/ef86V on line 14
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:
24.26 ms | 407 KiB | 5 Q