3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Test { private $arg1; private $arg2; public function __construct() { $this->arg1 = $this->arg2 = new DateTime; } public function tester() { var_dump($this->arg1, $this->arg2); } } $test = new Test; $test->tester();
Output for 7.3.0alpha1
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-12-07 11:13:40.003484" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-12-07 11:13:40.003484" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.6
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-12-07 11:13:40.131321" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-12-07 11:13:40.131321" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.5
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-12-07 11:13:40.003028" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-12-07 11:13:40.003028" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.0
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-12-07 11:13:40.004136" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-12-07 11:13:40.004136" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.7
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-12-07 11:13:40.002423" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-12-07 11:13:40.002423" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.6
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-12-07 11:13:40.006431" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-12-07 11:13:40.006431" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.5
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-12-07 11:13:40.008183" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-12-07 11:13:40.008183" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.0
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-12-07 11:13:40.004291" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-12-07 11:13:40.004291" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.0 - 7.0.20
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-12-07 11:13:40.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2016-12-07 11:13:40.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }