3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr1 = array( 1=>'val1', 2=>'val2', ); $arr2 = array( 1=>'num1', 2=>'num2', ); $array = array($arr1, $arr2); $newArr = array(array_column($array, 1), array_column($array, 2)); var_dump($newArr);
Output for git.master, git.master_jit, rfc.property-hooks
array(2) { [0]=> array(2) { [0]=> string(4) "val1" [1]=> string(4) "num1" } [1]=> array(2) { [0]=> string(4) "val2" [1]=> string(4) "num2" } }

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:
48.92 ms | 401 KiB | 8 Q