3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $x = array("a"=>"Mighty","b"=>"Gravity","c"=>"Clock","d"=>"Strike"); foreach($x as $q){ print_r($q); print_r(\n);} ?>
based on Fk1Oo
Output for 7.0.0 - 7.1.0
Mighty Fatal error: Uncaught Error: Undefined constant 'n' in /in/pAfLm:5 Stack trace: #0 {main} thrown in /in/pAfLm on line 5
Process exited with code 255.
Output for 5.3.0 - 5.6.28
Mighty Fatal error: Undefined constant 'n' in /in/pAfLm on line 5
Process exited with code 255.
Output for 4.3.0 - 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/pAfLm on line 5 Mighty Notice: Use of undefined constant n - assumed 'n' in /in/pAfLm on line 5 nGravity Notice: Use of undefined constant n - assumed 'n' in /in/pAfLm on line 5 nClock Notice: Use of undefined constant n - assumed 'n' in /in/pAfLm on line 5 nStrike Notice: Use of undefined constant n - assumed 'n' in /in/pAfLm on line 5 n