3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array ( 'relation' => 'AND', 'key1' => 'Demo', 'value1' => 'demo', 'compare1' => '=', 'type1' => 'NUMERIC', 'key2' => 'test', 'value2' => 'test', 'compare2' => '=', 'type2' => 'NUMERIC', ); $new = array_merge(array_splice($arr, 0,1), array_chunk($arr, 4, true)); foreach($new as &$a){ if(is_array($a)) $a = array_combine(["key", "value", "compare", "type"],$a); } var_export($new);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 'relation' => 'AND', 0 => array ( 'key' => 'Demo', 'value' => 'demo', 'compare' => '=', 'type' => 'NUMERIC', ), 1 => array ( 'key' => 'test', 'value' => 'test', 'compare' => '=', 'type' => 'NUMERIC', ), )

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:
62.79 ms | 402 KiB | 8 Q