3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = '2015-01-01T00:00:00.000Z'; echo "DateTimeZone will be ignored because date has a timezone 'Z'\n"; $dateTime = new DateTime($date, new DateTimeZone('America/Mexico_City')); echo $dateTime->format('c'). "\n\n"; echo "DateTimeZone will be ignored, date timezone is in UTC anyway!\n"; $dateTime = new DateTime($date, new DateTimeZone('UTC')); echo $dateTime->format('c'). "\n\n"; $date = '2015-01-01T00:00:00.000'; echo "Timezone will be set to the given DateTimeZone America/Mexico_City\n"; $dateTime = new DateTime($date, new DateTimeZone('America/Mexico_City')); echo $dateTime->format('c'). "\n\n"; echo "Timezone will be set to the given DateTimeZone UTC\n"; $dateTime = new DateTime($date, new DateTimeZone('UTC')); echo $dateTime->format('c'). "\n\n"; echo "Timezone will set to the given timezone set in the date string America/Mexico_City\n"; $date = '2015-01-01T00:00:00.000 America/Mexico_City'; $dateTime = new DateTime($date); echo $dateTime->format('c'). "\n\n";

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.70.0070.01117.13
8.3.60.0140.00316.88
8.3.50.0100.00823.12
8.3.40.0140.00419.17
8.3.30.0110.00319.47
8.3.20.0000.00820.58
8.3.10.0030.00523.86
8.3.00.0000.00817.88
8.2.180.0120.00316.72
8.2.170.0090.00922.96
8.2.160.0110.00420.78
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0040.00421.09
8.2.110.0090.00019.64
8.2.100.0000.01318.34
8.2.90.0080.00019.51
8.2.80.0090.00018.00
8.2.70.0060.00318.00
8.2.60.0000.00818.04
8.2.50.0040.00518.10
8.2.40.0030.00620.25
8.2.30.0070.00018.27
8.2.20.0040.00418.24
8.2.10.0000.00718.46
8.2.00.0070.00418.26
8.1.280.0030.01425.92
8.1.270.0000.00924.16
8.1.260.0050.00326.35
8.1.250.0050.00328.09
8.1.240.0060.00324.15
8.1.230.0110.00018.07
8.1.220.0060.00317.80
8.1.210.0040.00418.77
8.1.200.0160.00317.49
8.1.190.0000.00817.73
8.1.180.0000.00818.10
8.1.170.0030.00619.02
8.1.160.0040.00422.30
8.1.150.0040.00419.26
8.1.140.0020.00517.83
8.1.130.0000.00718.04
8.1.120.0000.00818.00
8.1.110.0000.00817.90
8.1.100.0070.00017.85
8.1.90.0000.00717.99
8.1.80.0000.00717.93
8.1.70.0000.00817.96
8.1.60.0040.00417.96
8.1.50.0050.00317.87
8.1.40.0000.00817.84
8.1.30.0050.00318.11
8.1.20.0030.00518.01
8.1.10.0060.00318.03
8.1.00.0040.00417.93
8.0.300.0040.00418.77
8.0.290.0000.00817.13
8.0.280.0000.00818.82
8.0.270.0000.00817.59
8.0.260.0030.00317.55
8.0.250.0030.00417.45
8.0.240.0000.00817.45
8.0.230.0040.00417.41
8.0.220.0070.00017.39
8.0.210.0040.00417.39
8.0.200.0080.00017.47
8.0.190.0000.00817.32
8.0.180.0050.00217.38
8.0.170.0040.00417.42
8.0.160.0050.00317.40
8.0.150.0000.00817.31
8.0.140.0000.00817.26
8.0.130.0030.00313.79
8.0.120.0040.00417.36
8.0.110.0050.00317.39
8.0.100.0000.00717.30
8.0.90.0040.00417.35
8.0.80.0000.01617.23
8.0.70.0000.00717.20
8.0.60.0050.00317.37
8.0.50.0040.00417.33
8.0.30.0100.01017.36
8.0.20.0100.01017.40
8.0.10.0040.00417.38
8.0.00.0090.01117.14
7.4.330.0050.00015.31
7.4.320.0030.00316.85
7.4.300.0070.00016.93
7.4.290.0040.00416.89
7.4.280.0040.00717.04
7.4.270.0080.00017.02
7.4.260.0030.00816.91
7.4.250.0000.00916.96
7.4.240.0030.00316.83
7.4.230.0050.00216.81
7.4.220.0030.01416.78
7.4.210.0060.01016.84
7.4.200.0000.00716.97
7.4.160.0100.01016.86
7.4.150.0110.01517.40
7.4.140.0130.00817.86
7.4.130.0050.01117.01
7.4.120.0080.01016.67
7.4.110.0080.00816.98
7.4.100.0130.00916.50
7.4.90.0170.00716.77
7.4.80.0090.01219.39
7.4.70.0070.02116.88
7.4.60.0120.00616.74
7.4.50.0030.00316.87
7.4.40.0090.00916.82
7.4.30.0080.00816.83
7.4.00.0030.01415.05
7.3.330.0070.00013.63
7.3.320.0000.00713.73
7.3.310.0000.00716.74
7.3.300.0000.00816.59
7.3.290.0090.00616.68
7.3.280.0100.00716.63
7.3.270.0040.01617.40
7.3.260.0060.01216.70
7.3.250.0120.00616.72
7.3.240.0070.01016.72
7.3.230.0100.01016.77
7.3.210.0070.01316.56
7.3.200.0180.00019.39
7.3.190.0150.00716.74
7.3.180.0080.00816.97
7.3.170.0120.00416.93
7.3.160.0090.00616.73
7.3.10.0170.00016.44
7.3.00.0070.01316.72
7.2.330.0120.00616.78
7.2.320.0130.01016.86
7.2.310.0000.01717.05
7.2.300.0150.00716.81
7.2.290.0120.00416.63
7.2.130.0140.00516.33
7.2.120.0180.00316.58
7.2.110.0130.00716.66
7.2.100.0150.00716.90
7.2.90.0180.00616.69
7.2.80.0130.00716.60
7.2.70.0100.01316.85
7.2.60.0100.00617.06
7.2.50.0210.00717.13
7.2.40.0170.00816.92
7.2.30.0140.01016.73
7.2.20.0130.00716.72
7.2.10.0170.01016.81
7.2.00.0100.00818.33
7.1.250.0070.01115.23
7.1.200.0090.00615.99
7.1.100.0000.01017.97
7.1.70.0040.00417.30
7.1.60.0140.01019.40
7.1.50.0060.00617.20
7.1.00.0030.07722.40
7.0.200.0030.00715.11
7.0.140.0000.07322.11
7.0.60.0070.06719.92
7.0.50.0130.07717.87
7.0.40.0070.08020.07
7.0.30.0370.07320.17
7.0.20.0370.07320.09
7.0.10.0070.04720.21
7.0.00.0030.04320.20
5.6.280.0030.07320.92
5.6.210.0170.07020.57
5.6.200.0000.08018.17
5.6.190.0000.04720.45
5.6.180.0400.05720.48
5.6.170.0170.05020.54
5.6.160.0100.07020.50
5.6.150.0000.06718.21
5.6.140.0070.08318.11
5.6.130.0070.09018.08
5.6.120.0070.07021.01
5.6.110.0070.07020.96
5.6.100.0270.06721.00
5.6.90.0030.05021.03
5.6.80.0100.07320.38
5.5.350.4300.04720.50
5.5.340.0200.06717.93
5.5.330.0100.08020.23
5.5.320.0270.07320.27
5.5.310.0300.05020.18
5.5.300.0100.07717.97
5.5.290.0030.08718.01
5.5.280.0100.10720.88
5.5.270.0030.05020.87
5.5.260.0130.08320.77
5.5.250.0000.07720.59
5.5.240.0170.07320.28
5.4.450.0900.05019.47
5.4.440.0400.07019.13
5.4.430.0500.06019.56
5.4.420.0570.05319.24
5.4.410.0070.05318.70
5.4.400.0400.04718.61
5.4.390.0370.05718.48
5.4.380.0130.05318.48
5.4.370.0100.04318.68
5.4.360.0070.03718.71
5.4.350.0080.03911.98
5.4.340.0090.04611.98
5.4.320.0040.04212.47
5.4.310.0080.04112.46
5.4.300.0080.03412.47
5.4.290.0070.04212.46
5.4.280.0080.03412.36
5.4.270.0070.03512.36
5.4.260.0040.03912.36
5.4.250.0050.03812.36
5.4.240.0070.03712.36
5.4.230.0050.03812.36
5.4.220.0070.03412.36
5.4.210.0050.03612.36
5.4.200.0060.04012.36
5.4.190.0080.03312.35
5.4.180.0050.03612.35
5.4.170.0060.03612.36
5.4.160.0050.03612.35
5.4.150.0060.03412.35
5.4.140.0070.03412.04
5.4.130.0060.03412.02
5.4.120.0090.03111.98
5.4.110.0060.03511.98
5.4.100.0050.03611.97
5.4.90.0060.03611.98
5.4.80.0050.03711.98
5.4.70.0070.03311.97
5.4.60.0090.03111.97
5.4.50.0050.03711.97
5.4.40.0060.03411.96
5.4.30.0010.04011.95
5.4.20.0030.03711.95
5.4.10.0020.03811.96
5.4.00.0030.03911.45
5.3.290.0090.03612.80
5.3.280.0070.03612.70
5.3.270.0060.03812.72
5.3.260.0050.03912.72
5.3.250.0030.03912.72
5.3.240.0080.03412.72
5.3.230.0060.03812.71
5.3.220.0060.03712.68
5.3.210.0060.03912.68
5.3.200.0040.03812.68
5.3.190.0060.03712.68
5.3.180.0070.03412.67
5.3.170.0050.03812.67
5.3.160.0050.03612.67
5.3.150.0050.03812.68
5.3.140.0040.03712.66
5.3.130.0050.03812.66
5.3.120.0060.03812.65
5.3.110.0090.03512.66
5.3.100.0100.03212.12
5.3.90.0040.03712.08
5.3.80.0070.03412.07
5.3.70.0040.03712.07
5.3.60.0030.03812.06
5.3.50.0060.03512.00
5.3.40.0070.03412.00
5.3.30.0030.03711.96
5.3.20.0040.03611.74
5.3.10.0060.03911.71
5.3.00.0040.03711.70
5.2.170.0060.0299.20
5.2.160.0050.0289.20
5.2.150.0040.0319.20
5.2.140.0040.0369.20
5.2.130.0070.0269.16
5.2.120.0030.0299.16
5.2.110.0070.0269.16
5.2.100.0060.0269.16
5.2.90.0030.0309.16
5.2.80.0030.0319.16
5.2.70.0040.0309.16
5.2.60.0040.0309.11
5.2.50.0030.0319.08
5.2.40.0030.0309.05
5.2.30.0020.0319.04
5.2.20.0030.0309.02
5.2.10.0020.0308.94
5.2.00.0030.0298.80
5.1.60.0040.0238.08
5.1.50.0050.0238.08
5.1.40.0040.0238.06
5.1.30.0050.0248.41
5.1.20.0090.0218.43
5.1.10.0080.0218.16
5.1.00.0050.0258.15
5.0.50.0020.0226.64
5.0.40.0020.0216.50
5.0.30.0030.0316.31
5.0.20.0030.0196.28
5.0.10.0020.0216.26
5.0.00.0040.0306.25
4.4.90.0020.0164.78
4.4.80.0050.0134.76
4.4.70.0050.0134.75
4.4.60.0030.0204.75
4.4.50.0010.0174.77
4.4.40.0010.0264.71
4.4.30.0030.0154.76
4.4.20.0030.0154.85
4.4.10.0020.0154.85
4.4.00.0020.0254.76
4.3.110.0020.0164.67
4.3.100.0030.0144.66
4.3.90.0040.0154.63
4.3.80.0050.0264.59
4.3.70.0050.0154.63
4.3.60.0040.0154.63
4.3.50.0050.0134.63
4.3.40.0030.0244.54
4.3.30.0020.0163.30
4.3.20.0020.0163.28
4.3.10.0010.0173.24
4.3.00.0130.0207.14

preferences:
50.37 ms | 401 KiB | 5 Q