3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $x="123,456,789"; for($i=0; $i<10; $i++){ if($x[$i]==",") $x[$i]=""; } echo $x; //123456789 (Correct)
Output for 7.1.0
Warning: Cannot assign an empty string to a string offset in /in/pqQor on line 4 Warning: Cannot assign an empty string to a string offset in /in/pqQor on line 4 123,456,789
Output for 4.3.0 - 5.0.5, 5.1.1 - 7.0.14
123456789
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/pqQor on line 6
Process exited with code 255.