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 fix_strtotime('04:00 yesterday'); // 2010-09-17 14:00:00
Output for 4.3.0 - 5.0.5, 5.1.1 - 5.6.28, hhvm-3.10.0 - 3.13.2, 7.0.0 - 7.1.0
1375236000
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/K44ut on line 11
Process exited with code 255.