3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $string='Foo, Bar, Test, X, Y, Z,'; $pos=0; $count=0; while(($pos = strpos($string, ',',$pos)) !== FALSE){ $count++; $pos++; // This ends echo $pos.",,"; } //echo $count;
Output for 4.3.0 - 5.0.5, 5.1.1 - 7.1.0
4,,9,,15,,18,,21,,24,,
Output for 5.1.0
<br /> <b>Fatal error</b>: fatal flex scanner internal error--end of buffer missed in <b>/in/eRLUt</b> on line <b>11</b><br />
Process exited with code 255.