3v4l.org

run code in 300+ PHP versions simultaneously
<?php $cars = [ [ 'Volvo', 22, 28 ], // index 0 [ 'BMW', 15, 13 ], // index 1 [ 'Land Rover', 3, 8 ], // index 2 [ 'Add Cars', 'X', 'Y' ] // index i ]; $i = count($cars) -1; // get current last set in the array unset($cars[0]); // unset Volvo unset($cars[1]); // unset BMW unset($cars[$i]); // unset index # the only index not unset is 2 (Land Rover) so it should only be left inside the array print_r($cars);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [2] => Array ( [0] => Land Rover [1] => 3 [2] => 8 ) )

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