3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = [ 'Size: tiny', 'Size: small', 'Size: big', 'Colour: yellow', 'Colour: black', 'Colour: blue', 'Length: short', 'Length: long' ]; $result = []; foreach ($array as $v) { $result[strtok(':', $v)][] = $v; } var_export(array_values($result));
Output for git.master, git.master_jit
array ( 0 => array ( 0 => 'Size: tiny', 1 => 'Size: small', 2 => 'Size: big', 3 => 'Colour: yellow', 4 => 'Colour: black', 5 => 'Colour: blue', 6 => 'Length: short', 7 => 'Length: long', ), )

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:
40.01 ms | 856 KiB | 4 Q