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_match($regex, $repl, $param_string); print "$param\n"; $param = preg_grep($regex, $param_string); print "$param\n";
based on DlKmL
Output for 5.4.0 - 7.2.0
0 Notice: Array to string conversion in /in/XdDUi on line 8 Array
Output for 4.3.0 - 5.3.29
0 Array