3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ ['a' => 1, 'b' => 'x', 'c' => true], ['b' => 'y', 'a' => '2', 'c' => false], ['c' => null, 'b' => 'z', 'a' => 3] ]; $result = []; array_walk($array, function ($row, $i) use (&$result) { array_walk($row, function ($v, $k) use (&$result, $i) { $result[$k][$i] = $v; }); }); var_export($result);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 'a' => array ( 0 => 1, 1 => '2', 2 => 3, ), 'b' => array ( 0 => 'x', 1 => 'y', 2 => 'z', ), 'c' => array ( 0 => true, 1 => false, 2 => NULL, ), )

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:
27.02 ms | 405 KiB | 5 Q