3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date_utc = new DateTime('1895-01-01 05:17:32 UTC'); for($i = 1890; $i <= 1900 ; $i++) { $date = new DateTime( $i. '-01-01T00:00', new DateTimeZone('America/Toronto')); echo $date->format('Y-m-d H:i:s'), PHP_EOL; if($i == 1895) $utc_local = $date->format('U') . PHP_EOL; } if(isset($utc_local)) var_dump($date_utc->format('U') . ' => ' . $utc_local, $date->getTimezone()->getTransitions($utc_local, $utc_local));
Output for git.master, git.master_jit, rfc.property-hooks
1890-01-01 00:00:00 1891-01-01 00:00:00 1892-01-01 00:00:00 1893-01-01 00:00:00 1894-01-01 00:00:00 1895-01-01 00:17:32 1896-01-01 00:00:00 1897-01-01 00:00:00 1898-01-01 00:00:00 1899-01-01 00:00:00 1900-01-01 00:00:00 string(27) "-2366736148 => -2366736148 " array(1) { [0]=> array(5) { ["ts"]=> int(-2366736148) ["time"]=> string(25) "1895-01-01T05:17:32+00:00" ["offset"]=> int(-18000) ["isdst"]=> bool(false) ["abbr"]=> string(3) "EST" } }

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:
35.79 ms | 402 KiB | 8 Q