3v4l.org

run code in 300+ PHP versions simultaneously
<?php function parseDate($dateValue) { $dateFormats = array( 'D, d M y H:i:s T', 'D, d M Y H:i:s T', 'D, d-M-y H:i:s T', 'D, d-M-Y H:i:s T', 'D, d-m-y H:i:s T', 'D, d-m-Y H:i:s T', 'D M j G:i:s Y', 'D M d H:i:s Y T', ); foreach ($dateFormats as $dateFormat) { if (false !== $date = \DateTime::createFromFormat($dateFormat, $dateValue, new \DateTimeZone('GMT'))) { return $date; } } return date_create($dateValue, new \DateTimeZone('GMT')); } $dates = array( array('Friday, 31-Jul-20 08:49:37 GMT', 'Friday, 31-Jul-2020 08:49:37 GMT'), array('Fri Jul 31 08:49:37 2020', 'Friday, 31-Jul-2020 08:49:37 GMT'), ); foreach ($dates as $date) { echo parseDate($date[0])->format(\DateTime::COOKIE) . "\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.130.0090.00018.39
8.3.120.0030.00718.88
8.3.110.0070.01120.94
8.3.100.0080.00824.06
8.3.90.0120.00316.47
8.3.80.0000.01018.43
8.3.70.0070.01118.08
8.3.60.0110.00716.50
8.3.50.0090.01016.53
8.3.40.0040.01118.92
8.3.30.0070.00718.87
8.3.20.0040.00421.76
8.3.10.0080.00023.40
8.3.00.0040.00419.80
8.2.250.0000.00818.37
8.2.240.0060.00317.58
8.2.230.0060.00322.58
8.2.220.0090.00037.54
8.2.210.0090.00926.77
8.2.200.0060.00318.29
8.2.190.0110.00716.83
8.2.180.0070.00718.31
8.2.170.0120.00322.96
8.2.160.0090.00620.39
8.2.150.0030.00624.18
8.2.140.0000.00824.66
8.2.130.0060.00326.16
8.2.120.0080.00020.96
8.2.110.0060.00320.52
8.2.100.0090.00318.03
8.2.90.0000.00819.17
8.2.80.0040.00417.97
8.2.70.0030.00717.75
8.2.60.0050.00318.16
8.2.50.0040.00418.16
8.2.40.0050.00322.15
8.2.30.0050.00321.03
8.2.20.0040.00418.25
8.2.10.0000.00818.18
8.2.00.0000.00718.20
8.1.300.0040.00418.45
8.1.290.0090.00318.88
8.1.280.0110.01125.92
8.1.270.0040.00424.66
8.1.260.0060.01026.35
8.1.250.0040.00428.09
8.1.240.0000.01022.81
8.1.230.0040.00819.28
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0030.00617.48
8.1.190.0080.00017.24
8.1.180.0080.00018.10
8.1.170.0040.00418.69
8.1.160.0040.00419.09
8.1.150.0030.00620.61
8.1.140.0020.00519.55
8.1.130.0000.00918.88
8.1.120.0050.00217.48
8.1.110.0050.00317.57
8.1.100.0000.00817.58
8.1.90.0000.00717.60
8.1.80.0040.00417.64
8.1.70.0040.00417.57
8.1.60.0040.00417.67
8.1.50.0030.00617.49
8.1.40.0030.00617.56
8.1.30.0000.00817.78
8.1.20.0040.00417.63
8.1.10.0030.00617.64
8.1.00.0000.01017.48
8.0.300.0080.00018.77
8.0.290.0040.00417.00
8.0.280.0070.00018.51
8.0.270.0040.00417.24
8.0.260.0000.00718.86
8.0.250.0000.00717.04
8.0.240.0030.00517.20
8.0.230.0000.00717.10
8.0.220.0030.00317.15
8.0.210.0070.00016.98
8.0.200.0000.00717.13
8.0.190.0000.00817.04
8.0.180.0000.00717.02
8.0.170.0040.00417.15
8.0.160.0000.00717.11
8.0.150.0000.00817.02
8.0.140.0000.00717.05
8.0.130.0050.00013.55
8.0.120.0060.00317.08
8.0.110.0040.00417.19
8.0.100.0030.00616.96
8.0.90.0040.00416.98
8.0.80.0070.01017.08
8.0.70.0000.00716.93
8.0.60.0030.00616.93
8.0.50.0000.00716.95
8.0.30.0100.00817.14
8.0.20.0150.00517.40
8.0.10.0000.00717.27
8.0.00.0100.01316.79
7.4.330.0030.00315.55
7.4.320.0000.00716.43
7.4.300.0000.00716.71
7.4.290.0000.00716.56
7.4.280.0050.00516.51
7.4.270.0040.00416.58
7.4.260.0000.00716.66
7.4.250.0050.00316.48
7.4.240.0000.00816.66
7.4.230.0040.00416.47
7.4.220.0100.01716.73
7.4.210.0000.01416.66
7.4.200.0040.00416.58
7.4.160.0120.00716.46
7.4.150.0120.00617.40
7.4.140.0110.00717.86
7.4.130.0140.00716.53
7.4.120.0120.01216.60
7.4.110.0190.00616.70
7.4.100.0160.00616.64
7.4.90.0030.01516.85
7.4.80.0090.00919.39
7.4.70.0100.00716.48
7.4.60.0090.00616.75
7.4.50.0030.01316.55
7.4.40.0130.00416.57
7.4.30.0030.01316.57
7.4.10.0060.01215.09
7.4.00.0040.01415.25
7.3.330.0000.00513.31
7.3.320.0030.00313.45
7.3.310.0000.00716.34
7.3.300.0030.00316.49
7.3.290.0060.01016.39
7.3.280.0090.00816.40
7.3.270.0120.01217.40
7.3.260.0070.01116.47
7.3.250.0140.00616.55
7.3.240.0100.00916.72
7.3.230.0160.00016.40
7.3.210.0060.01116.56
7.3.200.0090.00916.63
7.3.190.0120.00616.66
7.3.180.0060.01416.68
7.3.170.0080.00816.55
7.3.160.0000.01616.56
7.3.130.0060.01215.00
7.3.120.0130.00315.11
7.3.110.0060.01215.19
7.3.100.0080.00415.02
7.3.90.0070.01114.80
7.3.80.0130.00715.05
7.3.70.0080.00315.13
7.3.60.0090.00315.04
7.3.50.0030.00814.68
7.3.40.0120.00315.12
7.3.30.0060.00314.84
7.3.20.0000.01516.55
7.3.10.0140.00416.44
7.3.00.0080.00716.85
7.2.330.0060.01217.05
7.2.320.0090.01317.07
7.2.310.0030.01417.04
7.2.300.0130.00316.98
7.2.290.0000.01716.62
7.2.260.0070.01015.40
7.2.250.0070.01015.06
7.2.240.0030.01115.49
7.2.230.0040.00715.21
7.2.220.0060.01015.28
7.2.210.0030.00915.07
7.2.200.0040.01115.31
7.2.190.0090.00315.29
7.2.180.0110.00415.29
7.2.170.0090.00915.28
7.2.160.0040.00715.29
7.2.150.0100.00717.14
7.2.140.0040.01117.20
7.2.130.0090.01016.67
7.2.120.0070.01016.87
7.2.110.0150.00716.92
7.2.100.0080.01116.80
7.2.90.0070.01216.76
7.2.80.0120.00716.83
7.2.70.0070.01416.82
7.2.60.0100.00916.98
7.2.50.0120.00616.87
7.2.40.0150.00617.04
7.2.30.0110.00916.73
7.2.20.0110.00916.89
7.2.10.0130.00816.85
7.2.00.0050.01216.95
7.1.330.0030.01016.07
7.1.320.0070.01015.77
7.1.310.0070.00716.01
7.1.300.0100.00315.96
7.1.290.0030.00915.93
7.1.280.0060.00916.10
7.1.270.0080.00416.03
7.1.260.0070.00715.85
7.1.250.0100.00915.87
7.1.240.0070.01115.70
7.1.230.0070.00715.91
7.1.220.0120.00315.96
7.1.210.0100.00315.92
7.1.200.0030.01115.98
7.1.190.0080.00615.82
7.1.180.0090.00916.05
7.1.170.0060.00615.99
7.1.160.0000.01315.90
7.1.150.0150.00015.90
7.1.140.0040.00815.68
7.1.130.0090.00615.60
7.1.120.0050.00516.09
7.1.110.0000.01716.07
7.1.100.0000.01315.97
7.1.90.0060.00616.06
7.1.80.0090.00916.04
7.1.70.0020.01116.59
7.1.60.0390.00824.65
7.1.50.0390.00524.63
7.1.40.0340.00924.18
7.1.30.0420.01024.43
7.1.20.0390.00824.50
7.1.10.0200.01415.31
7.1.00.0270.01015.54
7.0.330.0070.00715.35
7.0.320.0000.01315.32
7.0.310.0030.00915.52
7.0.300.0030.01015.60
7.0.290.0040.01115.16
7.0.280.0100.00315.13
7.0.270.0060.00315.68
7.0.260.0000.01315.48
7.0.250.0000.01415.54
7.0.240.0000.01315.53
7.0.230.0030.00615.45
7.0.220.0140.00315.36
7.0.210.0060.00615.46
7.0.200.0330.01115.36
7.0.190.0320.00915.15
7.0.180.0270.01214.96
7.0.170.0550.00714.85
7.0.160.0520.01314.95
7.0.150.0310.00915.05
7.0.140.0320.01215.06
7.0.130.0270.00715.23
7.0.120.0270.00614.99
7.0.110.0410.01015.06
7.0.100.0240.01015.17
7.0.90.0430.00815.09
7.0.80.0220.00915.04
7.0.70.0200.01215.13
7.0.60.0250.01314.93
7.0.50.0230.00515.20
7.0.40.0240.01014.27
7.0.30.0430.00914.10
7.0.20.0260.01314.06
7.0.10.0330.01014.03
7.0.00.0400.01214.18
5.6.400.0100.00314.48
5.6.390.0030.00614.70
5.6.380.0120.00014.28
5.6.370.0060.00914.59
5.6.360.0060.00914.51
5.6.350.0070.00714.52
5.6.340.0060.00614.52
5.6.330.0040.00414.38
5.6.320.0070.00314.57
5.6.310.0030.01314.55
5.6.300.0030.05417.64
5.6.290.0070.04417.60
5.6.280.0050.03717.79
5.6.270.0150.02817.84
5.6.260.0110.03417.54
5.6.250.0080.03317.67
5.6.240.0140.03017.76
5.6.230.0090.04417.56
5.6.220.0070.03717.64
5.6.210.0050.04217.60
5.6.200.0070.04217.56
5.6.190.0100.03617.78
5.6.180.0140.03017.63
5.6.170.0080.04217.51
5.6.160.0090.04717.59
5.6.150.0050.05317.65
5.6.140.0120.04017.73
5.6.130.0100.02917.68
5.6.120.0050.04217.43
5.6.110.0050.03717.59
5.6.100.0100.04517.79
5.6.90.0140.03217.52
5.6.80.0030.03817.32
5.6.70.0070.03517.41
5.6.60.0140.02917.40
5.6.50.0100.03017.30
5.6.40.0100.04217.29
5.6.30.0050.03817.20
5.6.20.0070.03817.25
5.6.10.0100.04117.16
5.6.00.0050.03317.22
5.5.380.0130.05017.54
5.5.370.0100.07017.52
5.5.360.0030.07717.47
5.5.350.0100.06017.59
5.5.340.0100.05718.13
5.5.330.0130.05717.95
5.5.320.0230.06318.14
5.5.310.0130.07318.05
5.5.300.0100.06018.12
5.5.290.0270.06717.94
5.5.280.0070.06317.95
5.5.270.0130.06318.04
5.5.260.0130.06318.12
5.5.250.0130.06317.85
5.5.240.0070.07717.34
5.5.230.0200.06017.32
5.5.220.0130.06017.40
5.5.210.0070.06317.18
5.5.200.0100.05317.38
5.5.190.0030.08017.39
5.5.180.0170.05717.38
5.5.160.0100.07017.32
5.5.150.0200.05017.37
5.5.140.0170.05017.31
5.5.130.0130.05317.33
5.5.120.0100.05317.48
5.5.110.0070.06017.46
5.5.100.0100.08017.30
5.5.90.0170.05017.36
5.5.80.0070.05317.25
5.5.70.0100.06717.19
5.5.60.0100.05717.27
5.5.50.0070.05317.04
5.5.40.0070.05717.01
5.5.30.0100.07017.28
5.5.20.0130.05017.27
5.5.10.0230.07717.35
5.5.00.0030.06017.37
5.4.450.0130.07019.32
5.4.440.0070.06319.34
5.4.430.0200.06319.31
5.4.420.0100.06019.44
5.4.410.0170.05019.21
5.4.400.0100.05019.00
5.4.390.0100.05719.05
5.4.380.0100.07719.06
5.4.370.0070.06018.82
5.4.360.0030.06719.06
5.4.350.0070.08018.92
5.4.340.0100.06719.08
5.4.320.0100.06018.92
5.4.310.0130.05018.92
5.4.300.0070.08319.01
5.4.290.0230.04718.86
5.4.280.0130.05718.84
5.4.270.0070.05719.15
5.4.260.0130.07319.01
5.4.250.0130.06019.00
5.4.240.0170.05019.02
5.4.230.0100.06019.07
5.4.220.0130.06719.10
5.4.210.0170.05018.92
5.4.200.0130.06019.23
5.4.190.0200.04718.82
5.4.180.0100.06719.09
5.4.170.0130.05319.05
5.4.160.0200.05319.23
5.4.150.0070.07318.90
5.4.140.0130.05716.39
5.4.130.0030.07716.54
5.4.120.0130.07016.54
5.4.110.0130.06016.73
5.4.100.0100.04716.65
5.4.90.0000.06016.64
5.4.80.0000.06016.67
5.4.70.0070.05316.61
5.4.60.0170.04716.39
5.4.50.0070.05316.69
5.4.40.0030.06316.72
5.4.30.0170.06016.45
5.4.20.0100.05016.45
5.4.10.0100.05016.35
5.4.00.0130.04716.13
5.3.290.0230.06714.86
5.3.280.0130.07714.90
5.3.270.0200.08014.73
5.3.260.0030.05714.67
5.3.250.0130.05714.91
5.3.240.0200.08014.66
5.3.230.0100.07314.65
5.3.220.0200.04314.84
5.3.210.0100.06014.75
5.3.200.0070.06714.70
5.3.190.0130.06314.47
5.3.180.0170.05314.86
5.3.170.0130.06714.85
5.3.160.0070.05314.78
5.3.150.0130.06014.84
5.3.140.0130.05314.61
5.3.130.0100.05714.70
5.3.120.0070.06014.74
5.3.110.0100.05014.60
5.3.100.0070.06014.09
5.3.90.0170.04714.07
5.3.80.0070.05714.07
5.3.70.0070.05714.07
5.3.60.0070.05714.12
5.3.50.0130.05014.14
5.3.40.0070.05714.26
5.3.30.0170.04714.09
5.3.20.0100.05313.89
5.3.10.0070.07013.95
5.3.00.0130.04713.81
5.2.170.0000.06311.20
5.2.160.0070.04711.14
5.2.150.0070.05311.45
5.2.140.0130.04011.32
5.2.130.0170.03311.16
5.2.120.0030.04711.29
5.2.110.0100.03711.36
5.2.100.0170.03311.15
5.2.90.0070.06011.36
5.2.80.0030.04711.14
5.2.70.0000.06311.21
5.2.60.0100.04011.25
5.2.50.0170.04311.14
5.2.40.0000.04710.98
5.2.30.0070.04311.23
5.2.20.0100.04010.96
5.2.10.0100.04010.88
5.2.00.0100.03710.99
5.1.60.0030.03710.19
5.1.50.0170.03010.22
5.1.40.0000.0579.86
5.1.30.0100.05010.21
5.1.20.0070.05310.66
5.1.10.0000.04010.35
5.1.00.0070.04710.28
5.0.50.0100.0308.63
5.0.40.0030.0278.39
5.0.30.0070.0478.29
5.0.20.0000.0338.35
5.0.10.0100.0338.25
5.0.00.0070.0538.35
4.4.90.0000.0237.38
4.4.80.0000.0277.38
4.4.70.0030.0237.38
4.4.60.0170.0177.38
4.4.50.0000.0277.38
4.4.40.0000.0377.38
4.4.30.0070.0207.38
4.4.20.0000.0377.38
4.4.10.0030.0237.38
4.4.00.0070.0307.38
4.3.110.0000.0277.38
4.3.100.0100.0237.38
4.3.90.0070.0277.38
4.3.80.0000.0377.38
4.3.70.0000.0237.38
4.3.60.0070.0277.38
4.3.50.0070.0177.38
4.3.40.0070.0377.38
4.3.30.0000.0237.38
4.3.20.0100.0207.38
4.3.10.0030.0237.38
4.3.00.0000.0277.38

preferences:
75.28 ms | 403 KiB | 5 Q