3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $sourcestring="A string A string A string Of strings to match"; preg_match_all('/string.+{1}/',$sourcestring,$match); foreach($match[0] as $thisMatch){ echo "$thisMatch\n"; }
Output for 5.2.3 - 5.6.28, 7.0.0 - 7.1.0
Warning: preg_match_all(): Compilation failed: nothing to repeat at offset 10 in /in/2h0ih on line 3 Warning: Invalid argument supplied for foreach() in /in/2h0ih on line 4
Output for hhvm-3.10.0 - 3.12.0
Warning: Compilation failed: nothing to repeat at offset 10 in /in/2h0ih on line 3 Warning: Invalid argument supplied for foreach() in /in/2h0ih on line 6
Output for 4.4.3 - 5.2.2
<br /> <b>Warning</b>: preg_match_all() [<a href='function.preg-match-all'>function.preg-match-all</a>]: Compilation failed: nothing to repeat at offset 10 in <b>/in/2h0ih</b> on line <b>3</b><br /> <br /> <b>Warning</b>: Invalid argument supplied for foreach() in <b>/in/2h0ih</b> on line <b>4</b><br />
Output for 4.4.0 - 4.4.2
<br /> <b>Warning</b>: preg_match_all(): Compilation failed: nothing to repeat at offset 10 in <b>/in/2h0ih</b> on line <b>3</b><br /> <br /> <b>Warning</b>: Invalid argument supplied for foreach() in <b>/in/2h0ih</b> on line <b>4</b><br />
Output for 4.3.11
<br /> <b>Warning</b>: preg_match_all(): Compilation failed: nothing to repeat at offset 10 in <b>/in/2h0ih</b> on line <b>3</b><br />
Output for 4.3.0 - 4.3.10
<br /> <b>Warning</b>: Compilation failed: nothing to repeat at offset 10 in <b>/in/2h0ih</b> on line <b>3</b><br /> <br /> <b>Warning</b>: Invalid argument supplied for foreach() in <b>/in/2h0ih</b> on line <b>4</b><br />