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"; $oracle_date = date('d/m/y H:i:s A', strtotime($new_date)); echo $oracle_date; echo "\n"; echo date("d/m/y h:i:s A"); $elapsed_time = round(abs(date("d/m/y h:i:s A") - $oracle_date) / 60,2); echo "\n"; echo $elapsed_time;
Output for 7.1.0
29-APR-13 09:28:12 PM 29/04/13 21:28:12 PM 30/04/13 02:39:16 AM Notice: A non well formed numeric value encountered in /in/0lkHg on line 14 Notice: A non well formed numeric value encountered in /in/0lkHg on line 14 0.02
Output for 4.3.0 - 5.6.25, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.0.14
29-APR-13 09:28:12 PM 29/04/13 21:28:12 PM 30/04/13 02:39:16 AM 0.02