3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $where = array('a, b, c, d'); $patterns = "/\b\w(\w*)\b/g"; echo preg_replace($patterns, $replace, '$1'); ?>
Output for 5.0.4 - 7.1.0
Notice: Undefined variable: replace in /in/OhTRs on line 4 Warning: preg_replace(): Unknown modifier 'g' in /in/OhTRs on line 4
Output for 4.3.11 - 5.0.3
Notice: Undefined variable: replace in /in/OhTRs on line 4 Warning: preg_replace(): Unknown modifier 'g' in /in/OhTRs on line 4
Output for 4.3.0 - 4.3.10
Notice: Undefined variable: replace in /in/OhTRs on line 4 Warning: Unknown modifier 'g' in /in/OhTRs on line 4