3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = new \DateTime('2017-08-07 00:00:00'); // initial date var_dump($date , new DateTime()); $dateInterval = $date->diff(new \DateTime()); // now $hours = ((int)$dateInterval->format('%a') * 24) + (int)$dateInterval->format('%h'); printf('%s:%s:%s' , $hours , $dateInterval->format('%I'), $dateInterval->format('%S'));
Output for git.master
object(DateTime)#1 (3) { ["date"]=> string(26) "2017-08-07 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2017-08-07 13:48:53.003686" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } 13:48:53
Output for git.master_jit
object(DateTime)#1 (3) { ["date"]=> string(26) "2017-08-07 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2017-08-07 13:48:53.003841" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } 13:48:53
Output for rfc.property-hooks
object(DateTime)#1 (3) { ["date"]=> string(26) "2017-08-07 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2017-08-07 13:48:53.003594" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } 13:48:53

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
73.19 ms | 401 KiB | 8 Q