3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myArray = ['a','b','c','title1','d','e','f','title2','g','h','title3','i','title4','j','k']; $batch = 0; foreach ($myArray as $v) { if (strpos($v, 'title') !== 0) { $result[$batch][] = $v; } else { ++$batch; } } var_export($result);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => array ( 0 => 'a', 1 => 'b', 2 => 'c', ), 1 => array ( 0 => 'd', 1 => 'e', 2 => 'f', ), 2 => array ( 0 => 'g', 1 => 'h', ), 3 => array ( 0 => 'i', ), 4 => array ( 0 => 'j', 1 => 'k', ), )

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:
51.3 ms | 1665 KiB | 4 Q