3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $where = 'a, b, c, d'; $patterns = "/[ ]/"; echo preg_replace('/\w+./i', $1, 'a1, b2, c3, d4');; ?>
Output for 5.4.0 - 5.4.17
Parse error: syntax error, unexpected '1' (T_LNUMBER), expecting variable (T_VARIABLE) or '$' in /in/NEAJe on line 4
Process exited with code 255.
Output for 5.3.0 - 5.3.26
Parse error: syntax error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in /in/NEAJe on line 4
Process exited with code 255.