3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $list = array("value1", "value2"); $fp = STDOUT; foreach ($list as $line) { fwrite($fp, $line.PHP_EOL); }
Output for 5.2.3 - 7.1.0
value1 value2
Output for 4.3.10 - 4.4.9, 5.0.2 - 5.2.2
Notice: Use of undefined constant STDOUT - assumed 'STDOUT' in /in/Z9m7p on line 5 Warning: fwrite(): supplied argument is not a valid stream resource in /in/Z9m7p on line 7 Warning: fwrite(): supplied argument is not a valid stream resource in /in/Z9m7p on line 7
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
Notice: Use of undefined constant STDOUT - assumed 'STDOUT' in /in/Z9m7p on line 5 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/Z9m7p on line 7 Warning: fwrite(): supplied argument is not a valid stream resource in /in/Z9m7p on line 7 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/Z9m7p on line 7 Warning: fwrite(): supplied argument is not a valid stream resource in /in/Z9m7p on line 7