3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function getA() { echo 'get arr'; return array('a','b','c'); } foreach(getA() as $val) { echo $val . PHP_EOL; }
Output for 4.3.10 - 4.4.9, 5.0.2 - 7.2.0
get arra b c
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
get arr Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/7bkuo on line 7 aPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/7bkuo on line 7 bPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/7bkuo on line 7 cPHP_EOL