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 5.2.3 - 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/NUXIT on line 7
Output for 4.4.3 - 4.4.9, 5.0.2 - 5.2.2
Hi Array ( [0] => Pre show 2013 [1] => JCK 2012 [2] => Pre show 2014 [3] => JCK 2014 ) <br /> <b>Warning</b>: preg_grep() [<a href='function.preg-grep'>function.preg-grep</a>]: Compilation failed: nothing to repeat at offset 0 in <b>/in/NUXIT</b> on line <b>7</b><br />
Output for 5.0.0 - 5.0.1
HiPHP_EOLArray ( [0] => Pre show 2013 [1] => JCK 2012 [2] => Pre show 2014 [3] => JCK 2014 ) PHP_EOLPHP_EOL<br /> <b>Warning</b>: preg_grep() [<a href='function.preg-grep'>function.preg-grep</a>]: Compilation failed: nothing to repeat at offset 0 in <b>/in/NUXIT</b> on line <b>7</b><br />
Output for 4.3.11 - 4.4.2
Hi Array ( [0] => Pre show 2013 [1] => JCK 2012 [2] => Pre show 2014 [3] => JCK 2014 ) <br /> <b>Warning</b>: preg_grep(): Compilation failed: nothing to repeat at offset 0 in <b>/in/NUXIT</b> on line <b>7</b><br />
Output for 4.3.10
Hi Array ( [0] => Pre show 2013 [1] => JCK 2012 [2] => Pre show 2014 [3] => JCK 2014 ) <br /> <b>Warning</b>: Compilation failed: nothing to repeat at offset 0 in <b>/in/NUXIT</b> on line <b>7</b><br />
Output for 4.3.0 - 4.3.9
HiPHP_EOLArray ( [0] => Pre show 2013 [1] => JCK 2012 [2] => Pre show 2014 [3] => JCK 2014 ) PHP_EOLPHP_EOL<br /> <b>Warning</b>: Compilation failed: nothing to repeat at offset 0 in <b>/in/NUXIT</b> on line <b>7</b><br />