3v4l.org

run code in 300+ PHP versions simultaneously
<?php $subject = 'in the middle 9850112686331(14-15) for Rocco A & Stephanie'; $arr = explode(' ', $subject); $candidates = []; for ($i = 0; $i < count($arr); $i++) { for ($j = $i; $j < count($arr); $j++) { $candidates[] = implode(' ', array_slice($arr, $i, $j - $i + 1)) . PHP_EOL; } } sort($candidates); print_r($candidates);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => & [1] => & Stephanie [2] => 9850112686331(14-15) [3] => 9850112686331(14-15) for [4] => 9850112686331(14-15) for Rocco [5] => 9850112686331(14-15) for Rocco A [6] => 9850112686331(14-15) for Rocco A & [7] => 9850112686331(14-15) for Rocco A & Stephanie [8] => A [9] => A & [10] => A & Stephanie [11] => Rocco [12] => Rocco A [13] => Rocco A & [14] => Rocco A & Stephanie [15] => Stephanie [16] => for [17] => for Rocco [18] => for Rocco A [19] => for Rocco A & [20] => for Rocco A & Stephanie [21] => in [22] => in the [23] => in the middle [24] => in the middle 9850112686331(14-15) [25] => in the middle 9850112686331(14-15) for [26] => in the middle 9850112686331(14-15) for Rocco [27] => in the middle 9850112686331(14-15) for Rocco A [28] => in the middle 9850112686331(14-15) for Rocco A & [29] => in the middle 9850112686331(14-15) for Rocco A & Stephanie [30] => middle [31] => middle 9850112686331(14-15) [32] => middle 9850112686331(14-15) for [33] => middle 9850112686331(14-15) for Rocco [34] => middle 9850112686331(14-15) for Rocco A [35] => middle 9850112686331(14-15) for Rocco A & [36] => middle 9850112686331(14-15) for Rocco A & Stephanie [37] => the [38] => the middle [39] => the middle 9850112686331(14-15) [40] => the middle 9850112686331(14-15) for [41] => the middle 9850112686331(14-15) for Rocco [42] => the middle 9850112686331(14-15) for Rocco A [43] => the middle 9850112686331(14-15) for Rocco A & [44] => the middle 9850112686331(14-15) for Rocco A & Stephanie )

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:
66.9 ms | 405 KiB | 8 Q