3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = 'December 2012 Name: Jack Brown'; $ptr = "/^(?P<month>:Jan(?:uary)?|Feb(?:ruary)?|Dec(?:ember)?) (?P<year>:19[7-9]\d|2\d{3}|[0-9]{2})/"; preg_match($ptr, $str, $data); echo $data['month'].' '.$data['year'];
based on W15a6
Output for 4.3.3 - 7.3.0rc4
December 2012
Output for 4.3.0 - 4.3.2
Notice: Undefined index: month in /in/9VOFp on line 6 Notice: Undefined index: year in /in/9VOFp on line 6