3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function fix_strtotime($date) { if(preg_match('/([012]?[0-9]?:[0-5]{1}\d\s*[aA|pP]?[mM]?)(\s+)(.+)/', $date, $matches)) { return strtotime($matches[3] . $matches[2] . $matches[1]); } return strtotime($date); } echo date('Y-m-d H:i:s', fix_strtotime('04:00:00 yesterday')); // 2010-09-17 14:00:00
Output for 4.3.0 - 5.0.5, 5.1.1 - 7.1.0
2013-07-31 00:00:00
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/03tXg on line 11
Process exited with code 255.