3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date1 = new DateTime('2014-08-26 14:35:29'); $date2 = new DateTime(); // The diff-methods returns a new DateInterval-object... $diff = $date2->diff($date1); var_dump($date2); echo"\n\n"; echo $diff->h;
Output for git.master
object(DateTime)#2 (3) { ["date"]=> string(26) "2014-08-28 19:37:45.003577" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } 5
Output for git.master_jit
object(DateTime)#2 (3) { ["date"]=> string(26) "2014-08-28 19:37:45.003786" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } 5
Output for rfc.property-hooks
object(DateTime)#2 (3) { ["date"]=> string(26) "2014-08-28 19:37:45.003832" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } 5

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:
37.35 ms | 401 KiB | 8 Q