3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $input = "hello;world;if(blah){blahcode}"; for($i = 0; $i < strlen($input); $i+=1) { switch($input[$i]) { case ";": $input[$i] += '\n'; break; } } echo $input; ?>
based on oDaOO
Output for 7.1.0 - 7.2.0
Fatal error: Uncaught Error: Cannot use assign-op operators with string offsets in /in/Y2T85:8 Stack trace: #0 {main} thrown in /in/Y2T85 on line 8
Process exited with code 255.
Output for 7.0.0 - 7.0.20
Fatal error: Uncaught Error: Cannot use assign-op operators with overloaded objects nor string offsets in /in/Y2T85:8 Stack trace: #0 {main} thrown in /in/Y2T85 on line 8
Process exited with code 255.
Output for 5.5.0 - 5.6.28
Fatal error: Cannot use assign-op operators with overloaded objects nor string offsets in /in/Y2T85 on line 8
Process exited with code 255.