3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array ( 0 => array ( 0 => "Vaccination", 1 => "Date of entry", 2 => "Animal", 3 => "Dog", 4 => "246", 5 => "4", 6 => "984", 7 => "102", ), 1 => array ( 0 => "Vaccination", 1 => "Date of entry", 2 => "Animal", 3 => "Cat", 4 => "246", 5 => "4", 6 => "984", 7 => "118", ), ); foreach ($arr as $key => &$value) { $value = array_merge(array_slice($value, 0,3), [end($value)], array_slice($value, 3,-1)); } print_r($arr);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [0] => Vaccination [1] => Date of entry [2] => Animal [3] => 102 [4] => Dog [5] => 246 [6] => 4 [7] => 984 ) [1] => Array ( [0] => Vaccination [1] => Date of entry [2] => Animal [3] => 118 [4] => Cat [5] => 246 [6] => 4 [7] => 984 ) )

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:
127.98 ms | 406 KiB | 5 Q