3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "The date is :" . date('Y-d-m H:i:s', '2014-02-05 5:22:35'); $date = strtotime(date('Y-d-m H:i:s', '2014-02-05 5:22:35')); $now = time(); echo round(abs($now - $date) / 60,2). " minutes ago";
Output for 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.5 - 7.2.6
Notice: A non well formed numeric value encountered in /in/qjvR9 on line 3 The date is :1970-01-01 01:33:34 Notice: A non well formed numeric value encountered in /in/qjvR9 on line 4 23315255.6 minutes ago
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5
The date is :1970-01-01 01:33:3423315255.6 minutes ago

preferences:
169.97 ms | 402 KiB | 219 Q