3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $maches='{Promotional SMS Credits: 0, Transactional SMS Credits: 9973}'; $matches=preg_replace("/(\w+)?/", '"\1":',$matches); print_r($matches); echo "\n"; $matches=preg_replace("/(\w*)/", '"\1":',$matches); print_r($matches);
based on erUld
Output for 5.0.4 - 7.2.0
Notice: Undefined variable: matches in /in/iP0IE on line 9 "": "":""":"""::"":
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: matches in /in/iP0IE on line 9 "": "":""":"""::"":