3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $param_string = "CREATED_AT > TO_DATE(:delete_date, 'DD/MM/YYYY HH24:MI:SS') AND"; $regex = '/[^A-Za-z]:\b([^\s:]+)\b[^:]/i'; $repl = '\1'; $param = preg_replace($regex, $repl, $param_string); print "$param\n"; $param = preg_grep($regex, $param_string); print "$param\n";
based on lZK8Y
Output for 5.2.0 - 7.2.0
CREATED_AT > TO_DATEdelete_date 'DD/MM/YYYY HH24:MI:SS') AND Warning: preg_grep() expects parameter 2 to be array, string given in /in/sQBpG on line 7
Output for 4.3.11 - 5.1.6
CREATED_AT > TO_DATEdelete_date 'DD/MM/YYYY HH24:MI:SS') AND Warning: preg_grep(): Second argument to preg_grep() should be an array in /in/sQBpG on line 7
Output for 4.3.0 - 4.3.10
CREATED_AT > TO_DATEdelete_date 'DD/MM/YYYY HH24:MI:SS') AND Warning: Second argument to preg_grep() should be an array in /in/sQBpG on line 7