3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array(1 => '5ive', 'jim' => 'bob', 4 => 5); echo current($array) . "\n"; var_dump($array); echo "\n\n"; var_dump(array_slice($array, 0, 1)); echo 'first item: ' . array_slice($array, 0, 1)[0]; echo "\n\n"; echo current($array) . "\n"; var_dump($array);
Output for git.master, git.master_jit, rfc.property-hooks
5ive array(3) { [1]=> string(4) "5ive" ["jim"]=> string(3) "bob" [4]=> int(5) } array(1) { [0]=> string(4) "5ive" } first item: 5ive 5ive array(3) { [1]=> string(4) "5ive" ["jim"]=> string(3) "bob" [4]=> int(5) }

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