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 "\n"; 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 PM 29-Apr-13 08:24:35 PM Notice: A non well formed numeric value encountered in /in/IdjoW on line 10 Notice: A non well formed numeric value encountered in /in/IdjoW on line 10 0
Output for 4.3.0 - 7.0.14
29-APR-13 09:28:12 PM 29-Apr-13 08:24:35 PM0