3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "This is my test case for an example."; preg_match_all( "/(?=(\S+ \S+))\S+ /", $string, $m ); var_export($m[1]);
Output for 8.0.1 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.26, 8.4.1 - 8.4.13
array ( 0 => 'This is', 1 => 'is my', 2 => 'my test', 3 => 'test case', 4 => 'case for', 5 => 'for an', 6 => 'an example.', )

preferences:
88.48 ms | 407 KiB | 5 Q