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.11 - 4.4.9, 5.0.2 - 5.6.28, 7.0.0 - 7.1.0
Hi Array ( [0] => Pre show 2013 [1] => JCK 2012 [2] => Pre show 2014 [3] => JCK 2014 ) Warning: preg_grep(): Compilation failed: nothing to repeat at offset 0 in /in/F5qIY on line 7
Output for 4.3.10, hhvm-3.10.0 - 3.12.0
Hi Array ( [0] => Pre show 2013 [1] => JCK 2012 [2] => Pre show 2014 [3] => JCK 2014 ) Warning: Compilation failed: nothing to repeat at offset 0 in /in/F5qIY on line 7
Output for 5.0.0 - 5.0.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/F5qIY 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/F5qIY on line 5 PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/F5qIY on line 6 PHP_EOL Warning: preg_grep(): Compilation failed: nothing to repeat at offset 0 in /in/F5qIY on line 7
Output for 4.3.0 - 4.3.9
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/F5qIY 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/F5qIY on line 5 PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/F5qIY on line 6 PHP_EOL Warning: Compilation failed: nothing to repeat at offset 0 in /in/F5qIY on line 7