3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php //echo date('d-M-y'); //echo date('d-m-y H:i:s A' , strtotime( '29-APR-13 09.28.12.505032 pm')); $date = '29-APR-13 09.28.12.505032 PM'; $new_date = substr($date,0,18).substr($date, 25,28); $new_date = str_replace(".", ":", $new_date); echo $new_date; echo date("d/M/y h:i:s A"); $elapsed_time = round(abs(date("d/M/y h:i:s A") - $new_date) / 60,2); echo $elapsed_time;
Output for 7.1.0
29-APR-13 09:28:12 PM29/Apr/13 08:22:19 PM Notice: A non well formed numeric value encountered in /in/VJiEt on line 9 Notice: A non well formed numeric value encountered in /in/VJiEt on line 9 0
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.0.14
29-APR-13 09:28:12 PM29/Apr/13 08:22:19 PM0