3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'hello world good morning'; $result = []; $i = 0; while (preg_match_all("/(?=\b(\w+(?: \w+){{$i}})\b)/", $string, $m)) { array_unshift($result, $m[1]); ++$i; } var_export($result);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => array ( 0 => 'hello world good morning', ), 1 => array ( 0 => 'hello world good', 1 => 'world good morning', ), 2 => array ( 0 => 'hello world', 1 => 'world good', 2 => 'good morning', ), 3 => array ( 0 => 'hello', 1 => 'world', 2 => 'good', 3 => 'morning', ), )

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