3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date1 = new DateTime("@1351382400"); var_dump($date1->format('c')); // Sun Oct 28 2012 00:00:00+00:00 var_dump($date1->getTimestamp()); //prints: 1351382400 $date1->setTimezone(new DateTimeZone("Europe/Stockholm")); var_dump($date1->format('U')); // prints: 1351382400 var_dump($date1->getTimestamp()); //prints: 1351386000
based on pts6t

Shows result from various feature-branches currently under review from the php developers. Contact me to have additional branches featured.

Output for branch master
string(25) "2012-10-28T00:00:00+00:00" int(1351382400) string(10) "1351382400" int(1351386000)

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