3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('America/New_York'); //DST starts Apr. 2nd 01:00 and moves to 03:00 $start = new \DateTime('2006-04-02T01:00:00'); $end = new \DateTime('2006-04-02T04:00:00'); while($end > $start) { $now = clone $end; $end->sub(new \DateInterval('PT1H')); echo $end->format('Y-m-d H:i T') . PHP_EOL; if ($now == $end) { break; //remove this will result in an endless loop } } echo '-----' . \PHP_EOL; //DST ends Oct. 29th 02:00 and moves to 01:00 $date = new DateTime('2006-10-29T00:30:00'); foreach(range(1,4) as $i) { $date->add(new DateInterval('PT30M')); echo $date->format('Y-m-d H:i T'). PHP_EOL; }

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.40.0030.01418.70
8.3.30.0070.00718.80
8.3.20.0040.00420.62
8.3.10.0030.00621.73
8.3.00.0040.00422.38
8.2.170.0100.00622.96
8.2.160.0070.00721.19
8.2.150.0070.00025.66
8.2.140.0030.00624.66
8.2.130.0070.00026.16
8.2.120.0000.00721.19
8.2.110.0000.00921.00
8.2.100.0080.00418.03
8.2.90.0040.00418.03
8.2.80.0060.00317.97
8.2.70.0080.00017.75
8.2.60.0080.00317.68
8.2.50.0030.00618.07
8.2.40.0040.00418.29
8.2.30.0060.00318.06
8.2.20.0000.00718.07
8.2.10.0040.00419.25
8.2.00.0030.00618.23
8.1.270.0040.00420.44
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0000.00922.61
8.1.230.0070.00420.89
8.1.220.0060.00317.91
8.1.210.0050.00318.88
8.1.200.0060.00317.38
8.1.190.0050.00317.47
8.1.180.0000.00818.10
8.1.170.0000.00818.71
8.1.160.0040.00819.02
8.1.150.0040.00418.96
8.1.140.0000.00722.10
8.1.130.0060.00020.34
8.1.120.0000.00717.69
8.1.110.0070.00017.73
8.1.100.0050.00317.68
8.1.90.0030.00717.65
8.1.80.0040.00417.55
8.1.70.0020.00517.65
8.1.60.0060.00617.69
8.1.50.0060.00317.55
8.1.40.0050.00317.66
8.1.30.0000.00817.72
8.1.20.0040.00417.77
8.1.10.0030.00617.60
8.1.00.0040.00417.69
8.0.300.0030.00419.98
8.0.290.0070.00316.88
8.0.280.0050.00218.56
8.0.270.0070.00017.30
8.0.260.0000.00618.49
8.0.250.0000.00717.14
8.0.240.0030.00317.07
8.0.230.0020.00517.09
8.0.220.0030.00316.95
8.0.210.0070.00016.97
8.0.200.0030.00317.15
8.0.190.0080.00017.11
8.0.180.0030.00517.17
8.0.170.0030.00617.06
8.0.160.0000.00717.04
8.0.150.0000.00716.98
8.0.140.0000.00716.92
8.0.130.0030.00313.57
8.0.120.0000.00717.07
8.0.110.0000.00717.06
8.0.100.0080.00016.86
8.0.90.0050.00217.08
8.0.80.0110.01117.13
8.0.70.0040.00416.97
8.0.60.0040.00417.15
8.0.50.0030.00517.07
8.0.30.0060.01117.34
8.0.20.0090.01017.34
8.0.10.0000.00817.05
8.0.00.0140.00617.09
7.4.330.0000.00516.79
7.4.320.0060.00016.64
7.4.300.0060.00016.72
7.4.290.0000.00816.48
7.4.280.0040.00416.61
7.4.270.0030.00316.66
7.4.260.0060.00316.69
7.4.250.0080.00016.66
7.4.240.0030.00616.66
7.4.230.0080.00016.52
7.4.220.0070.00016.84
7.4.210.0100.00616.71
7.4.200.0040.00416.71
7.4.160.0070.01016.66
7.4.140.0070.01017.86
7.4.130.0080.01116.63
7.4.120.0120.00916.86
7.4.110.0100.00716.64
7.4.100.0070.01416.71
7.4.90.0080.00816.81
7.4.80.0090.00919.39
7.4.70.0130.00316.80
7.4.60.0130.00316.69
7.4.50.0060.00916.41
7.4.40.0110.00716.70
7.4.00.0000.01415.23
7.3.330.0020.00213.33
7.3.320.0000.00513.29
7.3.310.0050.00216.28
7.3.300.0030.00316.45
7.3.290.0040.00216.48
7.3.280.0070.01116.45
7.3.260.0110.00516.51
7.3.240.0080.01016.57
7.3.230.0050.01416.60
7.3.210.0160.00816.53
7.3.200.0070.01016.41
7.3.190.0100.00616.48
7.3.180.0100.00716.43
7.3.170.0060.01016.67
7.3.160.0040.01816.60
7.3.30.0060.00814.81
7.3.20.0870.00714.73
7.3.10.0860.01415.11
7.3.00.0660.00714.86
7.2.330.0110.00716.97
7.2.320.0170.00316.97
7.2.310.0170.00016.86
7.2.300.0150.00617.01
7.2.290.0100.00616.73
7.2.160.0100.01315.06
7.2.150.0780.00715.07
7.2.140.0860.01015.32
7.2.130.0770.01015.06
7.2.120.0820.00715.21
7.2.110.0720.00715.06
7.2.100.0810.01014.99
7.2.90.0810.01014.85
7.2.80.0630.01314.91
7.2.70.0660.00315.46
7.2.60.0630.00715.41
7.2.50.0660.01015.19
7.2.40.0590.00315.14
7.2.30.0670.00315.02
7.2.20.0570.01215.19
7.2.10.0600.00715.08
7.2.00.0600.00915.37
7.1.270.0630.01314.21
7.1.260.0850.01414.05
7.1.250.0870.00314.23
7.1.240.0700.01014.18
7.1.230.0890.00914.15
7.1.220.0890.01014.10
7.1.210.0850.00713.94
7.1.200.0770.02314.21
7.1.190.0740.01213.86
7.1.180.1280.01014.20
7.1.170.0670.00914.13
7.1.160.0660.01014.09
7.1.150.0740.01014.21
7.1.140.0570.00413.88
7.1.130.0880.00314.16
7.1.120.0720.00713.99
7.1.110.0800.01014.33
7.1.100.0880.00013.99
7.1.90.0820.00014.33
7.1.80.0520.01614.28
7.1.70.0770.00314.08
7.1.60.0480.01014.04
7.1.50.0790.00414.16
7.1.40.1070.00713.99
7.1.30.0680.01713.96
7.1.20.0700.00314.05
7.1.10.0740.01114.01
7.1.00.0740.00314.10
7.0.330.0810.00313.72
7.0.320.0990.00313.62
7.0.310.0760.01413.98
7.0.300.0910.00313.70
7.0.290.0800.01413.99
7.0.280.0870.01013.73
7.0.270.0740.00313.64
7.0.260.0650.00313.52
7.0.250.0630.01313.98
7.0.240.0800.00613.70
7.0.230.0630.01013.69
7.0.220.0830.00413.75
7.0.210.0630.00413.79
7.0.200.0380.01913.77
7.0.190.0620.00613.84
7.0.180.0630.00413.70
7.0.170.0710.00413.98
7.0.160.0660.01013.75
7.0.150.0560.00913.80
7.0.140.0710.00313.61
7.0.130.0580.01913.52
7.0.120.0670.00613.94
7.0.110.0680.00313.63
7.0.100.0780.00613.55
7.0.90.0710.00013.73
7.0.80.0620.00713.50
7.0.70.0580.01013.92
7.0.60.0510.00613.82
7.0.50.0530.01313.84
7.0.40.0660.00613.48
7.0.30.0660.00013.84
7.0.20.0750.00313.96
7.0.10.0590.00713.59
7.0.00.0570.01213.62
5.6.400.0070.00714.39
5.6.390.0130.00814.58
5.6.380.0190.00814.52
5.6.370.0230.00914.30
5.6.360.0180.00614.27
5.6.350.0160.02014.17
5.6.340.0160.00514.28
5.6.330.0180.01414.06
5.6.320.0170.01414.50
5.6.310.0090.01414.48
5.6.300.0160.01214.39
5.6.290.0120.00814.55
5.6.280.0220.00414.20
5.6.270.0090.01414.12
5.6.260.0190.00314.34
5.6.250.0220.00814.42
5.6.240.0120.00714.38
5.6.230.0130.01814.52
5.6.220.0100.01614.49
5.6.210.0150.00514.42
5.6.200.0180.00914.54
5.6.190.0040.01414.35
5.6.180.0200.00014.38
5.6.170.0110.01114.43
5.6.160.0190.00314.59
5.6.150.0140.00914.46
5.6.140.0160.01014.28
5.6.130.0190.00814.56
5.6.120.0150.00414.63
5.6.110.0140.01414.64
5.6.100.0060.01514.52
5.6.90.0140.01014.38
5.6.80.0170.00614.52
5.6.70.0080.00814.62
5.6.60.0200.00814.21
5.6.50.0120.00814.09
5.6.40.0160.00514.58
5.6.30.0070.01514.20
5.6.20.0070.01014.05
5.6.10.0150.00414.32
5.6.00.0260.00514.54
5.5.380.0120.00414.25
5.5.370.0110.00814.38
5.5.360.0110.01114.14
5.5.350.0040.01514.28
5.5.340.0070.01114.12
5.5.330.0160.00514.11
5.5.320.0150.00514.39
5.5.310.0030.01514.13
5.5.300.0150.00314.43
5.5.290.0100.01014.33
5.5.280.0100.00314.19
5.5.270.0070.02214.21
5.5.260.0080.00814.29
5.5.250.0050.01114.24
5.5.240.0060.01214.44
5.5.230.0130.00713.99
5.5.220.0090.00914.07
5.5.210.0050.01214.47
5.5.200.0240.01214.39
5.5.190.0130.00814.24
5.5.180.0110.00714.46
5.5.170.0110.00814.51
5.5.160.0120.00614.52
5.5.150.0170.00714.40
5.5.140.0170.00614.21
5.5.130.0110.00714.34
5.5.120.0180.00014.11
5.5.110.0140.01114.49
5.5.100.0000.02014.31
5.5.90.0130.00714.46
5.5.80.0120.00614.55
5.5.70.0150.00314.28
5.5.60.0110.01114.20
5.5.50.0110.00714.52
5.5.40.0140.00514.13
5.5.30.0100.00814.51
5.5.20.0140.00314.09
5.5.10.0180.00814.43
5.5.00.0060.01114.34
5.4.450.0070.01111.13
5.4.440.0120.00611.09
5.4.430.0090.00611.09
5.4.420.0150.00011.04
5.4.410.0120.00311.28
5.4.400.0180.00310.90
5.4.390.0070.00711.29
5.4.380.0050.01010.81
5.4.370.0060.00611.16
5.4.360.0120.01210.96
5.4.350.0100.00011.00
5.4.340.0130.00011.00
5.4.330.0100.01010.96
5.4.320.0080.01610.98
5.4.310.0110.00310.75
5.4.300.0120.00911.06
5.4.290.0090.00311.06
5.4.280.0080.00411.03
5.4.270.0080.00411.17
5.4.260.0080.00811.10
5.4.250.0130.00010.85
5.4.240.0090.00510.98
5.4.230.0070.00711.05
5.4.220.0070.00710.76
5.4.210.0000.01410.85
5.4.200.0130.00310.89
5.4.190.0140.00911.14
5.4.180.0080.00411.26
5.4.170.0170.00411.22
5.4.160.0150.00411.33
5.4.150.0160.00410.99
5.4.140.0110.00211.18
5.4.130.0120.00311.50
5.4.120.0100.00511.09
5.4.110.0030.01311.09
5.4.100.0040.01211.28
5.4.90.0060.01111.08
5.4.80.0100.00311.09
5.4.70.0030.00911.21
5.4.60.0080.00411.18
5.4.50.0100.00510.97
5.4.40.0140.00311.15
5.4.30.0110.00511.11
5.4.20.0110.00310.89
5.4.10.0170.00311.04
5.4.00.0060.01311.11
5.3.290.0100.00710.67
5.3.280.0150.00010.62
5.3.270.0170.00610.48
5.3.260.0070.01710.55
5.3.250.0140.00610.55
5.3.240.0180.00010.60
5.3.230.0090.00910.59
5.3.220.0110.00310.23
5.3.210.0110.00410.43
5.3.200.0070.00410.36
5.3.190.0150.00510.30
5.3.180.0050.01210.42
5.3.170.0070.00510.49
5.3.160.0100.00310.63
5.3.150.0100.00210.69
5.3.140.0130.00810.39
5.3.130.0150.00010.57
5.3.120.0080.00410.35
5.3.110.0040.00810.59
5.3.100.0100.00310.69
5.3.90.0160.00010.64
5.3.80.0030.00710.36
5.3.70.0060.00610.35
5.3.60.0160.00010.63
5.3.50.0160.00310.55
5.3.40.0120.00910.55
5.3.30.0080.00510.57
5.3.20.0100.00510.32
5.3.10.0200.00710.41
5.3.00.0140.00310.38
5.2.170.0070.0059.86
5.2.160.0070.0109.83
5.2.150.0100.0079.73
5.2.140.0170.0009.55
5.2.130.0140.0009.31
5.2.120.0040.0099.50
5.2.110.0110.0059.37
5.2.100.0040.0069.53
5.2.90.0080.0049.37
5.2.80.0050.0109.18
5.2.70.0140.0049.48
5.2.60.0040.0049.40
5.2.50.0050.0059.57
5.2.40.0050.0059.53
5.2.30.0040.0079.40
5.2.20.0090.0029.36
5.2.10.0060.0069.21
5.2.00.0110.0039.24
5.1.60.0120.0008.73
5.1.50.0070.0038.73
5.1.40.0120.0048.73
5.1.30.0080.0048.73
5.1.20.0040.0058.73
5.1.10.0060.0038.73
5.1.00.0110.0008.73
5.0.50.0090.0068.73
5.0.40.0080.0008.73
5.0.30.0000.0068.73
5.0.20.0090.0008.73
5.0.10.0050.0048.73
5.0.00.0070.0008.73
4.4.90.0030.0098.73
4.4.80.0060.0038.73
4.4.70.0000.0118.73
4.4.60.0050.0058.73
4.4.50.0000.0068.73
4.4.40.0090.0038.73
4.4.30.0060.0008.73
4.4.20.0000.0118.73
4.4.10.0000.0068.73
4.4.00.0110.0008.73
4.3.110.0060.0008.73
4.3.100.0000.0048.73
4.3.90.0090.0038.73
4.3.80.0030.0038.73
4.3.70.0070.0008.73
4.3.60.0050.0038.73
4.3.50.0060.0008.73
4.3.40.0000.0078.73
4.3.30.0000.0058.73
4.3.20.0050.0008.73
4.3.10.0030.0038.73
4.3.00.0030.0038.73

preferences:
56.34 ms | 400 KiB | 5 Q