3v4l.org

run code in 300+ PHP versions simultaneously
<?php $time = 1659458933; $tz = new DateTimeZone( 'America/Indiana/Indianapolis' ); $transitions = $tz->getTransitions( $time ); if(is_array($transitions) && count($transitions) > 1) { var_dump( $transitions ); } else { //Nothing }

Abusive script

This script was stopped while abusing our resources

Output for 8.2.0 - 8.2.26, 8.3.0 - 8.3.15, 8.4.1 - 8.4.2
array(32) { [0]=> array(5) { ["ts"]=> int(1659458933) ["time"]=> string(25) "2022-08-02T16:48:53+00:00" ["offset"]=> int(-14400) ["isdst"]=> bool(true) ["abbr"]=> string(3) "EDT" } [1]=> array(5) { ["ts"]=> int(1667714400) ["time"]=> string(25) "2022-11-06T06:00:00+00:00" ["offset"]=> int(-18000) ["isdst"]=> bool(false) ["abbr"]=> string(3) "EST" } [2]=> array(5) { ["ts"]=> int(1678604400) ["time"]=> string(25) "2023-03-12T07:00:00+00:00" ["offset"]=> int(-14400) ["isdst"]=> bool(true) ["abbr"]=> string(3) "EDT" } [3]=> array(5) { ["ts"]=> int(1699164000) ["time"]=> string(25) "2023-11-05T06:00:00+00:00" ["offset"]=> int(-18000) ["isdst"]=> bool(false) ["abbr"]=> string(3) "EST" } [4]=> array(5) { ["ts"]=> int(1710054000) ["time"]=> string(25) "2024-03-10T07:00:00+00:00" ["offset"]=> int(-14400) ["isdst"]=> bool(true) ["abbr"]=> string(3) "EDT" } [5]=> array(5) { ["ts"]=> int(1730613600) ["time"]=> string(25) "2024-11-03T06:00:00+00:00" ["offset"]=> int(-18000) ["isdst"]=> bool(false) ["abbr"]=> string(3) "EST" } [6]=> array(5) { ["ts"]=> int(1741503600) ["time"]=> string(25) "2025-03-09T07:00:00+00:00" ["offset"]=> int(-14400) ["isdst"]=> bool(true) ["abbr"]=> string(3) "EDT" } [7]=> array(5) { ["ts"]=> int(1762063200) ["time"]=> string(25) "2025-11-02T06:00:00+00:00" ["offset"]=> int(-18000) ["isdst"]=> bool(false) ["abbr"]=> string(3) "EST" } [8]=> array(5) { ["ts"]=> int(1772953200) ["time"]=> string(25) "2026-03-08T07:00:00+00:00" ["offset"]=> int(-14400) ["isdst"]=> bool(true) ["abbr"]=> string(3) "EDT" } [9]=> array(5) { ["ts"]=> int(1793512800) ["time"]=> string(25) "2026-11-01T06:00:00+00:00" ["offset"]=> int(-18000) ["isdst"]=> bool(false) ["abbr"]=> string(3) "EST" } [10]=> array(5) { ["ts"]=> int(1805007600) ["time"]=> string(25) "2027-03-14T07:00:00+00:00" ["offset"]=> int(-14400) ["isdst"]=> bool(true) ["abbr"]=> string(3) "EDT" } [11]=> array(5) { ["ts"]=> int(1825567200) ["time"]=> string(25) "2027-11-07T06:00:00+00:00" ["offset"]=> int(-18000) ["isdst"]=> bool(false) ["abbr"]=> string(3) "EST" } [12]=> array(5) { ["ts"]=> int(1836457200) ["time"]=> string(25) "2028-03-12T07:00:00+00:00" ["offset"]=> int(-14400) ["isdst"]=> bool(true) ["abbr"]=> string(3) "EDT" } [13]=> array(5) { ["ts"]=> int(1857016800) ["time"]=> string(25) "2028-11-05T06:00:00+00:00" ["offset"]=> int(-18000) ["isdst"]=> bool(false) ["abbr"]=> string(3) "EST" } [14]=> array(5) { ["ts"]=> int(1867906800) ["time"]=> string(25) "2029-03-11T07:00:00+00:00" ["offset"]=> int(-14400) ["isdst"]=> bool(true) ["abbr"]=> string(3) "EDT" } [15]=> array(5) { ["ts"]=> int(1888466400) ["time"]=> string(25) "2029-11-04T06:00:00+00:00" ["offset"]=> int(-18000) ["isdst"]=> bool(false) ["abbr"]=> string(3) "EST" } [16]=> array(5) { ["ts"]=> int(1899356400) ["time"]=> string(25) "2030-03-10T07:00:00+00:00" ["offset"]=> int(-14400) ["isdst"]=> bool(true) ["abbr"]=> string(3) "EDT" } [17]=> array(5) { ["ts"]=> int(1919916000) ["time"]=> string(25) "2030-11-03T06:00:00+00:00" ["offset"]=> int(-18000) ["isdst"]=> bool(false) ["abbr"]=> string(3) "EST" } [18]=> array(5) { ["ts"]=> int(1930806000) ["time"]=> string(25) "2031-03-09T07:00:00+00:00" ["offset"]=> int(-14400) ["isdst"]=> bool(true) ["abbr"]=> string(3) "EDT" } [19]=> array(5) { ["ts"]=> int(1951365600) ["time"]=> string(25) "2031-11-02T06:00:00+00:00" ["offset"]=> int(-18000) ["isdst"]=> bool(false) ["abbr"]=> string(3) "EST" } [20]=> array(5) { ["ts"]=> int(1962860400) ["time"]=> string(25) "2032-03-14T07:00:00+00:00" ["offset"]=> int(-14400) ["isdst"]=> bool(true) ["abbr"]=> string(3) "EDT" } [21]=> array(5) { ["ts"]=> int(1983420000) ["time"]=> string(25) "2032-11-07T06:00:00+00:00" ["offset"]=> int(-18000) ["isdst"]=> bool(false) ["abbr"]=> string(3) "EST" } [22]=> array(5) { ["ts"]=> int(1994310000) ["time"]=> string(25) "2033-03-13T07:00:00+00:00" ["offset"]=> int(-14400) ["isdst"]=> bool(true) ["abbr"]=> string(3) "EDT" } [23]=> array(5) { ["ts"]=> int(2014869600) ["time"]=> string(25) "2033-11-06T06:00:00+00:00" ["offset"]=> int(-18000) ["isdst"]=> bool(false) ["abbr"]=> string(3) "EST" } [24]=> array(5) { ["ts"]=> int(2025759600) ["time"]=> string(25) "2034-03-12T07:00:00+00:00" ["offset"]=> int(-14400) ["isdst"]=> bool(true) ["abbr"]=> string(3) "EDT" } [25]=> array(5) { ["ts"]=> int(2046319200) ["time"]=> string(25) "2034-11-05T06:00:00+00:00" ["offset"]=> int(-18000) ["isdst"]=> bool(false) ["abbr"]=> string(3) "EST" } [26]=> array(5) { ["ts"]=> int(2057209200) ["time"]=> string(25) "2035-03-11T07:00:00+00:00" ["offset"]=> int(-14400) ["isdst"]=> bool(true) ["abbr"]=> string(3) "EDT" } [27]=> array(5) { ["ts"]=> int(2077768800) ["time"]=> string(25) "2035-11-04T06:00:00+00:00" ["offset"]=> int(-18000) ["isdst"]=> bool(false) ["abbr"]=> string(3) "EST" } [28]=> array(5) { ["ts"]=> int(2088658800) ["time"]=> string(25) "2036-03-09T07:00:00+00:00" ["offset"]=> int(-14400) ["isdst"]=> bool(true) ["abbr"]=> string(3) "EDT" } [29]=> array(5) { ["ts"]=> int(2109218400) ["time"]=> string(25) "2036-11-02T06:00:00+00:00" ["offset"]=> int(-18000) ["isdst"]=> bool(false) ["abbr"]=> string(3) "EST" } [30]=> array(5) { ["ts"]=> int(2120108400) ["time"]=> string(25) "2037-03-08T07:00:00+00:00" ["offset"]=> int(-14400) ["isdst"]=> bool(true) ["abbr"]=> string(3) "EDT" } [31]=> array(5) { ["ts"]=> int(2140668000) ["time"]=> string(25) "2037-11-01T06:00:00+00:00" ["offset"]=> int(-18000) ["isdst"]=> bool(false) ["abbr"]=> string(3) "EST" } }
Output for 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.34, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.6 - 8.1.31
array(32) { [0]=> array(5) { ["ts"]=> int(1659458933) ["time"]=> string(24) "2022-08-02T16:48:53+0000" ["offset"]=> int(-14400) ["isdst"]=> bool(true) ["abbr"]=> string(3) "EDT" } [1]=> array(5) { ["ts"]=> int(1667714400) ["time"]=> string(24) "2022-11-06T06:00:00+0000" ["offset"]=> int(-18000) ["isdst"]=> bool(false) ["abbr"]=> string(3) "EST" } [2]=> array(5) { ["ts"]=> int(1678604400) ["time"]=> string(24) "2023-03-12T07:00:00+0000" ["offset"]=> int(-14400) ["isdst"]=> bool(true) ["abbr"]=> string(3) "EDT" } [3]=> array(5) { ["ts"]=> int(1699164000) ["time"]=> string(24) "2023-11-05T06:00:00+0000" ["offset"]=> int(-18000) ["isdst"]=> bool(false) ["abbr"]=> string(3) "EST" } [4]=> array(5) { ["ts"]=> int(1710054000) ["time"]=> string(24) "2024-03-10T07:00:00+0000" ["offset"]=> int(-14400) ["isdst"]=> bool(true) ["abbr"]=> string(3) "EDT" } [5]=> array(5) { ["ts"]=> int(1730613600) ["time"]=> string(24) "2024-11-03T06:00:00+0000" ["offset"]=> int(-18000) ["isdst"]=> bool(false) ["abbr"]=> string(3) "EST" } [6]=> array(5) { ["ts"]=> int(1741503600) ["time"]=> string(24) "2025-03-09T07:00:00+0000" ["offset"]=> int(-14400) ["isdst"]=> bool(true) ["abbr"]=> string(3) "EDT" } [7]=> array(5) { ["ts"]=> int(1762063200) ["time"]=> string(24) "2025-11-02T06:00:00+0000" ["offset"]=> int(-18000) ["isdst"]=> bool(false) ["abbr"]=> string(3) "EST" } [8]=> array(5) { ["ts"]=> int(1772953200) ["time"]=> string(24) "2026-03-08T07:00:00+0000" ["offset"]=> int(-14400) ["isdst"]=> bool(true) ["abbr"]=> string(3) "EDT" } [9]=> array(5) { ["ts"]=> int(1793512800) ["time"]=> string(24) "2026-11-01T06:00:00+0000" ["offset"]=> int(-18000) ["isdst"]=> bool(false) ["abbr"]=> string(3) "EST" } [10]=> array(5) { ["ts"]=> int(1805007600) ["time"]=> string(24) "2027-03-14T07:00:00+0000" ["offset"]=> int(-14400) ["isdst"]=> bool(true) ["abbr"]=> string(3) "EDT" } [11]=> array(5) { ["ts"]=> int(1825567200) ["time"]=> string(24) "2027-11-07T06:00:00+0000" ["offset"]=> int(-18000) ["isdst"]=> bool(false) ["abbr"]=> string(3) "EST" } [12]=> array(5) { ["ts"]=> int(1836457200) ["time"]=> string(24) "2028-03-12T07:00:00+0000" ["offset"]=> int(-14400) ["isdst"]=> bool(true) ["abbr"]=> string(3) "EDT" } [13]=> array(5) { ["ts"]=> int(1857016800) ["time"]=> string(24) "2028-11-05T06:00:00+0000" ["offset"]=> int(-18000) ["isdst"]=> bool(false) ["abbr"]=> string(3) "EST" } [14]=> array(5) { ["ts"]=> int(1867906800) ["time"]=> string(24) "2029-03-11T07:00:00+0000" ["offset"]=> int(-14400) ["isdst"]=> bool(true) ["abbr"]=> string(3) "EDT" } [15]=> array(5) { ["ts"]=> int(1888466400) ["time"]=> string(24) "2029-11-04T06:00:00+0000" ["offset"]=> int(-18000) ["isdst"]=> bool(false) ["abbr"]=> string(3) "EST" } [16]=> array(5) { ["ts"]=> int(1899356400) ["time"]=> string(24) "2030-03-10T07:00:00+0000" ["offset"]=> int(-14400) ["isdst"]=> bool(true) ["abbr"]=> string(3) "EDT" } [17]=> array(5) { ["ts"]=> int(1919916000) ["time"]=> string(24) "2030-11-03T06:00:00+0000" ["offset"]=> int(-18000) ["isdst"]=> bool(false) ["abbr"]=> string(3) "EST" } [18]=> array(5) { ["ts"]=> int(1930806000) ["time"]=> string(24) "2031-03-09T07:00:00+0000" ["offset"]=> int(-14400) ["isdst"]=> bool(true) ["abbr"]=> string(3) "EDT" } [19]=> array(5) { ["ts"]=> int(1951365600) ["time"]=> string(24) "2031-11-02T06:00:00+0000" ["offset"]=> int(-18000) ["isdst"]=> bool(false) ["abbr"]=> string(3) "EST" } [20]=> array(5) { ["ts"]=> int(1962860400) ["time"]=> string(24) "2032-03-14T07:00:00+0000" ["offset"]=> int(-14400) ["isdst"]=> bool(true) ["abbr"]=> string(3) "EDT" } [21]=> array(5) { ["ts"]=> int(1983420000) ["time"]=> string(24) "2032-11-07T06:00:00+0000" ["offset"]=> int(-18000) ["isdst"]=> bool(false) ["abbr"]=> string(3) "EST" } [22]=> array(5) { ["ts"]=> int(1994310000) ["time"]=> string(24) "2033-03-13T07:00:00+0000" ["offset"]=> int(-14400) ["isdst"]=> bool(true) ["abbr"]=> string(3) "EDT" } [23]=> array(5) { ["ts"]=> int(2014869600) ["time"]=> string(24) "2033-11-06T06:00:00+0000" ["offset"]=> int(-18000) ["isdst"]=> bool(false) ["abbr"]=> string(3) "EST" } [24]=> array(5) { ["ts"]=> int(2025759600) ["time"]=> string(24) "2034-03-12T07:00:00+0000" ["offset"]=> int(-14400) ["isdst"]=> bool(true) ["abbr"]=> string(3) "EDT" } [25]=> array(5) { ["ts"]=> int(2046319200) ["time"]=> string(24) "2034-11-05T06:00:00+0000" ["offset"]=> int(-18000) ["isdst"]=> bool(false) ["abbr"]=> string(3) "EST" } [26]=> array(5) { ["ts"]=> int(2057209200) ["time"]=> string(24) "2035-03-11T07:00:00+0000" ["offset"]=> int(-14400) ["isdst"]=> bool(true) ["abbr"]=> string(3) "EDT" } [27]=> array(5) { ["ts"]=> int(2077768800) ["time"]=> string(24) "2035-11-04T06:00:00+0000" ["offset"]=> int(-18000) ["isdst"]=> bool(false) ["abbr"]=> string(3) "EST" } [28]=> array(5) { ["ts"]=> int(2088658800) ["time"]=> string(24) "2036-03-09T07:00:00+0000" ["offset"]=> int(-14400) ["isdst"]=> bool(true) ["abbr"]=> string(3) "EDT" } [29]=> array(5) { ["ts"]=> int(2109218400) ["time"]=> string(24) "2036-11-02T06:00:00+0000" ["offset"]=> int(-18000) ["isdst"]=> bool(false) ["abbr"]=> string(3) "EST" } [30]=> array(5) { ["ts"]=> int(2120108400) ["time"]=> string(24) "2037-03-08T07:00:00+0000" ["offset"]=> int(-14400) ["isdst"]=> bool(true) ["abbr"]=> string(3) "EDT" } [31]=> array(5) { ["ts"]=> int(2140668000) ["time"]=> string(24) "2037-11-01T06:00:00+0000" ["offset"]=> int(-18000) ["isdst"]=> bool(false) ["abbr"]=> string(3) "EST" } }
Output for 8.1.0 - 8.1.5
Output for 5.2.0 - 5.2.17
Warning: DateTimeZone::getTransitions() expects exactly 0 parameters, 1 given in /in/NiY8q on line 5
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6
Fatal error: Class 'DateTimeZone' not found in /in/NiY8q on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetimezone in /in/NiY8q on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetimezone in /in/NiY8q on line 4

preferences:
109.77 ms | 428 KiB | 5 Q