3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { protected $v; public function __construct($v) { $this->v = $v; } } $d1 = new DateTime(); $d2 = clone $d1; $d2->add(new DateInterval("P2D")); var_dump($d1); var_dump($d2); $a1 = new A($d1); $a2 = new A($d2); var_dump($a1 < $a2);
Output for git.master
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-23 17:58:02.003484" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2015-12-25 17:58:02.003484" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(true)
Output for git.master_jit
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-23 17:58:02.003654" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2015-12-25 17:58:02.003654" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(true)
Output for rfc.property-hooks
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-23 17:58:02.003517" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2015-12-25 17:58:02.003517" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(true)

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