3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo "Hi".PHP_EOL; $order = array("Pre show 2013","JCK 2012","Pre show 2014","JCK 2014"); print_r($order); echo PHP_EOL; echo PHP_EOL; print_r(preg_grep ("/$2014$/",$order));
Output for 4.3.10 - 4.4.9, 5.0.2 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Hi Array ( [0] => Pre show 2013 [1] => JCK 2012 [2] => Pre show 2014 [3] => JCK 2014 ) Array ( )
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/VSODp on line 2 HiPHP_EOLArray ( [0] => Pre show 2013 [1] => JCK 2012 [2] => Pre show 2014 [3] => JCK 2014 ) Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/VSODp on line 5 PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/VSODp on line 6 PHP_EOLArray ( )