3v4l.org

run code in 300+ PHP versions simultaneously
<?php //A timestamp indicates a fixed point in time, irregardless of timezone and daylight savings, so PHP must not change it when setting it: $x = new DateTime(); $x->setTimezone(new DateTimezone('America/Chicago')); $x->setTimestamp(1446357600); echo $x->format('c') . "\n"; $x->setTimestamp(1446361200); echo $x->format('c') . "\n"; //This should have a different offset since it's outside DST echo $x->getTimestamp(); //Simpler example $x = new DateTime(); $x->setTimezone(new DateTimezone('America/Chicago')); $x->setTimestamp(1446361200); echo $x->getTimestamp(); //Returns a different timestamp. No apparent way to specify a timestamp during the repeated hour.

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.60.0060.00916.50
8.3.50.0130.00622.07
8.3.40.0150.00318.99
8.3.30.0100.00319.21
8.3.20.0040.00420.34
8.3.10.0110.00720.69
8.3.00.0080.00019.14
8.2.180.0120.00618.41
8.2.170.0070.00722.96
8.2.160.0100.00320.30
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0040.00419.48
8.2.110.0000.00920.38
8.2.100.0040.00817.91
8.2.90.0030.00618.00
8.2.80.0050.00318.98
8.2.70.0050.00317.88
8.2.60.0050.00318.05
8.2.50.0040.00418.07
8.2.40.0080.00018.47
8.2.30.0080.00021.12
8.2.20.0050.00317.83
8.2.10.0040.00418.05
8.2.00.0000.00917.88
8.1.280.0170.00725.92
8.1.270.0000.00723.99
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0060.00319.05
8.1.230.0000.01117.77
8.1.220.0050.00317.91
8.1.210.0040.00418.77
8.1.200.0040.00417.61
8.1.190.0030.00517.66
8.1.180.0040.00419.38
8.1.170.0040.00418.54
8.1.160.0030.00619.08
8.1.150.0040.00419.09
8.1.140.0050.00217.79
8.1.130.0070.00017.97
8.1.120.0000.00817.63
8.1.110.0070.00017.62
8.1.100.0000.00717.75
8.1.90.0070.00017.80
8.1.80.0070.00017.80
8.1.70.0070.00017.70
8.1.60.0040.00417.68
8.1.50.0030.00517.77
8.1.40.0050.00317.73
8.1.30.0000.00917.93
8.1.20.0030.00517.89
8.1.10.0040.00417.70
8.1.00.0040.00417.71
8.0.300.0000.00718.81
8.0.290.0040.00416.88
8.0.280.0030.00318.46
8.0.270.0030.00517.41
8.0.260.0030.00517.46
8.0.250.0070.00017.10
8.0.240.0060.00017.11
8.0.230.0030.00617.20
8.0.220.0030.00317.07
8.0.210.0030.00317.23
8.0.200.0080.00017.26
8.0.190.0070.00317.16
8.0.180.0030.00517.20
8.0.170.0000.00717.16
8.0.160.0000.00817.16
8.0.150.0040.00417.09
8.0.140.0040.00417.12
8.0.130.0000.00813.45
8.0.120.0040.00417.16
8.0.110.0000.00717.13
8.0.100.0000.00717.22
8.0.90.0080.00016.98
8.0.80.0070.00717.18
8.0.70.0020.00517.14
8.0.60.0030.00517.10
8.0.50.0020.00517.11
8.0.30.0090.01317.33
8.0.20.0140.00517.41
8.0.10.0030.00617.28
8.0.00.0120.00916.77
7.4.330.0080.00015.02
7.4.320.0000.00716.71
7.4.300.0000.00616.64
7.4.290.0040.00416.66
7.4.280.0050.00316.61
7.4.270.0070.00016.73
7.4.260.0080.00016.63
7.4.250.0040.00416.50
7.4.240.0000.00716.77
7.4.230.0030.00316.81
7.4.220.0060.01216.74
7.4.210.0100.00716.77
7.4.200.0000.00716.67
7.4.160.0100.00716.49
7.4.150.0140.00517.40
7.4.140.0080.01317.86
7.4.130.0110.00516.61
7.4.120.0150.00616.74
7.4.110.0120.00616.93
7.4.100.0100.01316.54
7.4.90.0150.00316.57
7.4.80.0120.00816.64
7.4.70.0110.00516.82
7.4.60.0110.00816.76
7.4.50.0080.00016.59
7.4.40.0080.00816.57
7.4.30.0110.01416.92
7.4.00.0070.00915.27
7.3.330.0000.00513.32
7.3.320.0020.00213.29
7.3.310.0000.00716.41
7.3.300.0030.00316.39
7.3.290.0090.00916.40
7.3.280.0070.01016.37
7.3.270.0130.00717.40
7.3.260.0160.00316.48
7.3.250.0100.01016.71
7.3.240.0030.01316.79
7.3.230.0130.00616.46
7.3.210.0090.00916.73
7.3.200.0060.01519.39
7.3.190.0120.00616.42
7.3.180.0150.00716.70
7.3.170.0030.01316.77
7.3.160.0000.01916.42
7.3.120.0060.01315.02
7.3.110.0120.00615.05
7.3.100.0060.00914.86
7.3.90.0040.01414.76
7.3.80.0030.01014.73
7.3.70.0000.01514.67
7.3.60.0040.01215.05
7.3.50.0080.00414.95
7.3.40.0060.00615.07
7.3.30.0040.01114.93
7.3.20.0120.00617.04
7.3.10.0070.00816.85
7.3.00.0060.01016.89
7.2.330.0100.00716.98
7.2.320.0060.01616.73
7.2.310.0100.00717.07
7.2.300.0080.00817.00
7.2.290.0170.00816.66
7.2.250.0100.01315.54
7.2.240.0070.01015.07
7.2.230.0070.01015.19
7.2.220.0110.00715.32
7.2.210.0160.00015.06
7.2.200.0000.01015.18
7.2.190.0000.01415.11
7.2.180.0070.01314.80
7.2.170.0100.01015.19
7.2.130.0060.01217.12
7.2.120.0110.00717.05
7.2.110.0090.00916.80
7.2.100.0080.00817.32
7.2.90.0060.01217.35
7.2.80.0100.00616.83
7.2.70.0070.01017.17
7.2.60.0050.01016.88
7.2.50.0040.01117.16
7.2.40.0070.01117.11
7.2.30.0070.01117.04
7.2.20.0100.00717.06
7.2.10.0040.01217.14
7.2.00.0040.01118.28
7.1.330.0070.00716.04
7.1.320.0060.00315.88
7.1.310.0110.00315.68
7.1.300.0120.00015.74
7.1.290.0100.00315.85
7.1.280.0030.01015.59
7.1.270.0070.00315.65
7.1.260.0030.01015.96
7.1.250.0060.00915.80
7.1.200.0070.01015.82
7.1.100.0000.01418.20
7.1.70.0000.01017.25
7.1.60.0000.02519.34
7.1.50.0090.01516.68
7.1.00.0070.07322.41
7.0.200.0000.00716.84
7.0.140.0100.06022.21
7.0.60.0500.06019.88
7.0.50.0070.06317.88
7.0.40.0100.06019.98
7.0.30.0270.06320.04
7.0.20.0270.05320.24
7.0.10.0000.04720.21
7.0.00.0030.05319.99
5.6.280.0030.06720.98
5.6.210.0030.04020.74
5.6.200.0170.07318.21
5.6.190.0030.07320.39
5.6.180.0270.06720.41
5.6.170.0270.06720.71
5.6.160.0030.04020.41
5.6.150.0070.08318.18
5.6.140.0100.03318.21
5.6.130.0200.07318.14
5.6.120.0130.07020.77
5.6.110.0100.05021.08
5.6.100.0030.05021.13
5.6.90.0100.08320.96
5.6.80.0070.06720.38
5.5.350.0030.05720.52
5.5.340.0030.04018.02
5.5.330.0030.04320.26
5.5.320.0230.05720.29
5.5.310.0230.08720.34
5.5.300.0100.08018.02
5.5.290.0170.07017.98
5.5.280.0030.08720.80
5.5.270.0030.08320.96
5.5.260.0200.07020.84
5.5.250.0070.07720.68
5.5.240.0000.05320.27
5.4.450.0730.04319.43
5.4.440.0030.04719.10
5.4.430.0500.04019.24
5.4.420.0130.05319.31
5.4.410.0170.04719.16
5.4.400.0100.07719.06
5.4.390.0000.06318.98
5.4.380.0230.04018.93
5.4.370.0030.06019.01
5.4.360.0170.04719.26
5.4.350.0080.04011.98
5.4.340.0100.03611.97
5.4.320.0060.03912.45
5.4.310.0100.04112.45
5.4.300.0050.04512.46
5.4.290.0060.03912.45
5.4.280.0070.03812.35
5.4.270.0060.05112.35
5.4.260.0060.04912.35
5.4.250.0050.04312.35
5.4.240.0090.04412.35
5.4.230.0060.04012.34
5.4.220.0080.03812.34
5.4.210.0090.03912.34
5.4.200.0060.04412.34
5.4.190.0070.03612.34
5.4.180.0110.03812.34
5.4.170.0080.03612.35
5.4.160.0080.03812.34
5.4.150.0030.03912.34
5.4.140.0100.03512.02
5.4.130.0050.04312.01
5.4.120.0070.04011.97
5.4.110.0100.04011.97
5.4.100.0080.03511.97
5.4.90.0110.03511.97
5.4.80.0120.03711.97
5.4.70.0040.04611.96
5.4.60.0070.03911.96
5.4.50.0040.04011.96
5.4.40.0090.03611.95
5.4.30.0090.03411.95
5.4.20.0030.04111.95
5.4.10.0050.03611.95
5.4.00.0090.03511.44
5.3.290.0080.03812.80
5.3.280.0060.04212.71
5.3.270.0090.04112.72
5.3.260.0060.04312.72
5.3.250.0110.04912.72
5.3.240.0080.04612.72
5.3.230.0100.04312.71
5.3.220.0070.04912.68
5.3.210.0060.04612.68
5.3.200.0090.04012.68
5.3.190.0090.03912.68
5.3.180.0040.04212.68
5.3.170.0080.05312.67
5.3.160.0090.03512.67
5.3.150.0090.04312.67
5.3.140.0070.03712.66
5.3.130.0090.04712.66
5.3.120.0090.05312.66
5.3.110.0070.04512.66
5.3.100.0060.04012.12
5.3.90.0070.03712.09
5.3.80.0070.03712.08
5.3.70.0080.03612.08
5.3.60.0090.03612.06
5.3.50.0020.04112.00
5.3.40.0060.03712.00
5.3.30.0070.04011.95
5.3.20.0080.03511.72
5.3.10.0050.04011.69
5.3.00.0090.03911.68
5.2.170.0060.0319.19
5.2.160.0040.0329.19
5.2.150.0070.0339.19
5.2.140.0090.0389.18
5.2.130.0060.0359.14
5.2.120.0060.0299.14
5.2.110.0040.0339.15
5.2.100.0030.0319.15
5.2.90.0070.0299.14
5.2.80.0040.0319.14
5.2.70.0040.0319.14
5.2.60.0080.0319.10
5.2.50.0050.0339.06
5.2.40.0040.0349.04
5.2.30.0070.0299.02
5.2.20.0070.0389.01
5.2.10.0070.0348.93
5.2.00.0080.0318.79
5.1.60.0050.0248.07
5.1.50.0120.0218.07
5.1.40.0070.0268.04
5.1.30.0050.0278.39
5.1.20.0050.0288.41
5.1.10.0070.0308.14
5.1.00.0060.0318.14
5.0.50.0060.0266.63
5.0.40.0070.0226.49
5.0.30.0080.0306.30
5.0.20.0080.0226.27
5.0.10.0020.0216.26
5.0.00.0050.0436.25
4.4.90.0040.0194.78
4.4.80.0030.0204.76
4.4.70.0040.0164.76
4.4.60.0030.0184.75
4.4.50.0070.0144.77
4.4.40.0050.0254.70
4.4.30.0050.0154.76
4.4.20.0050.0154.84
4.4.10.0040.0164.85
4.4.00.0030.0284.76
4.3.110.0030.0164.67
4.3.100.0050.0154.67
4.3.90.0050.0174.63
4.3.80.0030.0264.59
4.3.70.0040.0184.63
4.3.60.0060.0184.63
4.3.50.0030.0214.63
4.3.40.0040.0254.54
4.3.30.0010.0173.28
4.3.20.0020.0163.25
4.3.10.0010.0183.22
4.3.00.0030.02013.23

preferences:
70.8 ms | 401 KiB | 5 Q