3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $input = "hello;world;if(blah){blahcode}"; for($i = 0; i < $input.length(); $i+=1) { switch($input[i]) { case ";": $input[i] += '\n'; break; } } ?>
based on HY071
Output for 7.2.0
Warning: Use of undefined constant i - assumed 'i' (this will throw an Error in a future version of PHP) in /in/qoAmm on line 3 Fatal error: Uncaught Error: Call to undefined function length() in /in/qoAmm:3 Stack trace: #0 {main} thrown in /in/qoAmm on line 3
Process exited with code 255.
Output for 7.0.0 - 7.1.10
Notice: Use of undefined constant i - assumed 'i' in /in/qoAmm on line 3 Fatal error: Uncaught Error: Call to undefined function length() in /in/qoAmm:3 Stack trace: #0 {main} thrown in /in/qoAmm on line 3
Process exited with code 255.
Output for 5.5.0 - 5.6.28
Notice: Use of undefined constant i - assumed 'i' in /in/qoAmm on line 3 Fatal error: Call to undefined function length() in /in/qoAmm on line 3
Process exited with code 255.