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; } } ?>
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/HY071 on line 3 Warning: Use of undefined constant length - assumed 'length' (this will throw an Error in a future version of PHP) in /in/HY071 on line 3
Output for 5.3.20 - 7.1.10
Notice: Use of undefined constant i - assumed 'i' in /in/HY071 on line 3 Notice: Use of undefined constant length - assumed 'length' in /in/HY071 on line 3