3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $string = '\n;alskdjf;lkdsajf;lkjdsaf \n hey judeee \n'; $pattern = '\n'; $start = 0; while(($newLine = strpos($string, $pattern, $start)) !== false){ $start = $newLine + 1; echo $newLine . '<br>'; }
Output for 4.3.0 - 7.1.0
0<br>27<br>41<br>