3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $d1 = "00:08:27"; $d2 = "00:01:32"; echo date('H:i:s',strtotime($d1 + $d2)); //$date1 = new DateTime('00:08:27'); //$date2 = new DateTime('00:01:32'); //$diff = $date2->diff($date1); //print_r( $diff )
based on Vvhdm
Output for 7.1.0 - 7.3.0beta1
Notice: A non well formed numeric value encountered in /in/s7MAc on line 5 Notice: A non well formed numeric value encountered in /in/s7MAc on line 5 01:00:00
Output for 5.6.0 - 5.6.30, hhvm-3.18.5 - 3.22.0, 7.0.0 - 7.0.27
01:00:00