3v4l.org

run code in 200+ php & hhvm versions
<?php $timestamp = strtotime('0000-02-20 00:00:00 UTC'); $timestamp2 = strtotime('0001-02-20 00:00:00 UTC'); print $timestamp . "\n"; $date_time = date_create('@' . $timestamp); print_r($date_time); print $timestamp2 . "\n"; $date_time2 = date_create('@' . $timestamp2); print_r($date_time2);
based on dlYio

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

Output for branch php-master
-62162899200 DateTime Object ( [date] => 0000-02-19 00:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 ) -62131276800 DateTime Object ( [date] => 0001-02-20 00:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 )
Output for branch php-master+opcache
-62162899200 DateTime Object ( [date] => 0000-02-19 00:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 ) -62131276800 DateTime Object ( [date] => 0001-02-20 00:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 )
Output for branch php-master+jit
-62162899200 DateTime Object ( [date] => 0000-02-19 00:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 ) -62131276800 DateTime Object ( [date] => 0001-02-20 00:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 )
Output for Typed properties v2
-62162899200 DateTime Object ( [date] => 0000-02-19 00:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 ) -62131276800 DateTime Object ( [date] => 0001-02-20 00:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 )
Output for Arrow functions
-62162899200 DateTime Object ( [date] => 0000-02-20 00:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 ) -62131276800 DateTime Object ( [date] => 0001-02-20 00:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 )
Output for Object typehint
-62162899200 DateTime Object ( [date] => 0000-02-20 00:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 ) -62131276800 DateTime Object ( [date] => 0001-02-20 00:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 )
Output for Array change keys
-62162899200 DateTime Object ( [date] => 0000-02-20 00:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 ) -62131276800 DateTime Object ( [date] => 0001-02-20 00:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 )
Output for Lexical anon
-62162899200 DateTime Object ( [date] => 0000-02-20 00:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 ) -62131276800 DateTime Object ( [date] => 0001-02-20 00:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 )

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