3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ 'vp 1'=>[5], 'vp 2'=>[10], 'vp 3'=>[15], 'vp 4'=>[20]]; $keys = array_keys($arr); $values = array_merge(array_slice($arr, 1), ["x"]); $new = array_combine($keys, $values); Var_dump($new);
Output for git.master, git.master_jit, rfc.property-hooks
array(4) { ["vp 1"]=> array(1) { [0]=> int(10) } ["vp 2"]=> array(1) { [0]=> int(15) } ["vp 3"]=> array(1) { [0]=> int(20) } ["vp 4"]=> string(1) "x" }

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