3v4l.org

run code in 500+ PHP versions simultaneously
<?php var_dump(date_parse('1642300000')); // GMT: Sunday, January 16, 2022 2:26:40 AM var_dump(date_parse('1642400000')); // GMT: Monday, January 17, 2022 6:13:20 AM var_dump(date_parse('1642500000')); // GMT: Tuesday, January 18, 2022 10:00:00 AM var_dump(date_parse('1642600000')); // GMT: Wednesday, January 19, 2022 1:46:40 PM var_dump(date_parse('1642700000')); // GMT: Thursday, January 20, 2022 5:33:20 PM
Output for 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.34, 8.2.0 - 8.2.34, 8.3.0 - 8.3.35, 8.4.1 - 8.4.26, 8.5.0 - 8.5.11
array(12) { ["year"]=> int(1642) ["month"]=> int(1) ["day"]=> int(300) ["hour"]=> bool(false) ["minute"]=> bool(false) ["second"]=> bool(false) ["fraction"]=> bool(false) ["warning_count"]=> int(1) ["warnings"]=> array(1) { [11]=> string(27) "The parsed date was invalid" } ["error_count"]=> int(3) ["errors"]=> array(3) { [7]=> string(20) "Unexpected character" [8]=> string(20) "Unexpected character" [9]=> string(20) "Unexpected character" } ["is_localtime"]=> bool(false) } array(12) { ["year"]=> int(0) ["month"]=> bool(false) ["day"]=> bool(false) ["hour"]=> int(16) ["minute"]=> int(42) ["second"]=> int(40) ["fraction"]=> float(0) ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } ["is_localtime"]=> bool(false) } array(12) { ["year"]=> int(0) ["month"]=> bool(false) ["day"]=> bool(false) ["hour"]=> int(16) ["minute"]=> int(42) ["second"]=> int(50) ["fraction"]=> float(0) ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } ["is_localtime"]=> bool(false) } array(12) { ["year"]=> int(0) ["month"]=> bool(false) ["day"]=> bool(false) ["hour"]=> int(16) ["minute"]=> int(42) ["second"]=> int(60) ["fraction"]=> float(0) ["warning_count"]=> int(1) ["warnings"]=> array(1) { [11]=> string(27) "The parsed time was invalid" } ["error_count"]=> int(0) ["errors"]=> array(0) { } ["is_localtime"]=> bool(false) } array(12) { ["year"]=> int(7000) ["month"]=> bool(false) ["day"]=> bool(false) ["hour"]=> int(16) ["minute"]=> int(42) ["second"]=> int(0) ["fraction"]=> bool(false) ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(2) ["errors"]=> array(2) { [8]=> string(20) "Unexpected character" [9]=> string(20) "Unexpected character" } ["is_localtime"]=> bool(false) }

preferences:
36.05 ms | 1149 KiB | 8 Q