3v4l.org

run code in 300+ PHP versions simultaneously
<?php $format = 'Y-m-d'; $value = '14-09-13'; $hasTimeInfo = (strpbrk($format, 'HhGgis') !== false); $date = DateTime::createFromFormat($format, $value, new DateTimeZone($hasTimeInfo ? 'Asia/Jakarta' : 'UTC')); $errors = DateTime::getLastErrors(); if ($date === false || $errors['error_count'] || $errors['warning_count']) { echo 'return false'; print_r($error); return; } if (!$hasTimeInfo) { $date->setTime(0, 0, 0); } echo $date->getTimestamp();

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.0060.00318.54
8.3.120.0200.00020.64
8.3.110.0160.00316.77
8.3.100.0080.00416.98
8.3.90.0040.00426.77
8.3.80.0040.00818.56
8.3.70.0040.01118.68
8.3.60.0070.01118.38
8.3.50.0120.01021.26
8.3.40.0170.00318.73
8.3.30.0030.01019.22
8.3.20.0080.00020.34
8.3.10.0000.00823.66
8.3.00.0050.00517.63
8.2.250.0040.00416.59
8.2.240.0000.00817.07
8.2.230.0090.00020.94
8.2.220.0080.00024.06
8.2.210.0130.00626.77
8.2.200.0030.00718.54
8.2.190.0090.01218.41
8.2.180.0160.00616.38
8.2.170.0100.00322.96
8.2.160.0100.00320.52
8.2.150.0060.00324.18
8.2.140.0030.00524.66
8.2.130.0040.00426.16
8.2.120.0000.00820.99
8.2.110.0030.00619.44
8.2.100.0090.00317.88
8.2.90.0000.00819.17
8.2.80.0060.00317.97
8.2.70.0040.00417.75
8.2.60.0000.00818.16
8.2.50.0060.00318.07
8.2.40.0050.00320.04
8.2.30.0040.00418.13
8.2.20.0060.00317.93
8.2.10.0070.00018.00
8.2.00.0070.00018.29
8.1.300.0080.00816.09
8.1.290.0040.00730.84
8.1.280.0140.00325.92
8.1.270.0000.00824.66
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0180.00322.88
8.1.230.0080.00317.48
8.1.220.0040.00417.76
8.1.210.0050.00318.77
8.1.200.0030.00617.35
8.1.190.0040.00417.36
8.1.180.0000.00818.10
8.1.170.0030.00620.51
8.1.160.0070.00021.95
8.1.150.0000.00818.88
8.1.140.0030.00617.52
8.1.130.0000.00717.73
8.1.120.0000.00717.52
8.1.110.0050.00317.47
8.1.100.0030.00317.57
8.1.90.0000.00817.51
8.1.80.0000.00717.39
8.1.70.0030.00317.55
8.1.60.0030.00517.51
8.1.50.0030.00517.38
8.1.40.0000.00817.47
8.1.30.0000.00817.58
8.1.20.0000.00717.64
8.1.10.0040.00417.46
8.1.00.0080.00017.39
8.0.300.0050.00318.77
8.0.290.0040.00416.88
8.0.280.0000.00718.43
8.0.270.0040.00417.15
8.0.260.0080.00017.30
8.0.250.0030.00317.14
8.0.240.0030.00316.95
8.0.230.0040.00217.10
8.0.220.0030.00316.88
8.0.210.0040.00417.03
8.0.200.0080.00317.08
8.0.190.0030.00617.14
8.0.180.0060.00316.93
8.0.170.0050.00317.07
8.0.160.0000.00717.01
8.0.150.0040.00417.01
8.0.140.0000.00816.93
8.0.130.0000.00613.45
8.0.120.0000.00816.90
8.0.110.0050.00316.93
8.0.100.0040.00416.88
8.0.90.0030.00616.80
8.0.80.0090.01216.97
8.0.70.0020.00516.91
8.0.60.0040.00416.89
8.0.50.0030.00517.05
8.0.30.0100.00817.16
8.0.20.0150.00317.40
8.0.10.0030.00316.93
8.0.00.0020.01616.75
7.4.330.0030.00315.14
7.4.320.0000.00616.52
7.4.300.0000.00616.65
7.4.290.0100.00016.50
7.4.280.0040.00416.35
7.4.270.0030.00316.41
7.4.260.0000.01116.50
7.4.250.0040.00416.44
7.4.240.0030.00416.45
7.4.230.0000.00616.41
7.4.220.0120.00616.49
7.4.210.0090.00816.51
7.4.200.0050.00216.64
7.4.160.0090.00616.62
7.4.150.0130.00717.40
7.4.140.0150.00717.86
7.4.130.0150.00516.59
7.4.120.0080.01116.50
7.4.110.0090.00916.63
7.4.100.0070.01416.36
7.4.90.0090.00916.68
7.4.80.0070.01019.39
7.4.70.0030.01316.49
7.4.60.0060.01216.66
7.4.50.0030.00516.37
7.4.40.0100.00716.56
7.4.30.0070.01416.61
7.4.00.0070.00714.90
7.3.330.0000.00513.13
7.3.320.0120.00013.14
7.3.310.0030.00316.34
7.3.300.0040.00416.41
7.3.290.0020.00516.43
7.3.280.0140.00516.40
7.3.270.0070.01017.40
7.3.260.0000.01716.50
7.3.250.0200.01716.46
7.3.240.0090.00916.48
7.3.230.0100.00716.50
7.3.210.0090.01216.43
7.3.200.0100.00719.39
7.3.190.0040.01216.40
7.3.180.0100.00716.44
7.3.170.0100.00716.59
7.3.160.0100.00716.35
7.3.10.0060.00616.86
7.3.00.0070.00716.49
7.2.330.0040.01616.62
7.2.320.0060.01516.44
7.2.310.0150.00316.93
7.2.300.0120.00616.81
7.2.290.0160.00716.95
7.2.130.0060.00316.50
7.2.120.0060.00917.05
7.2.110.0080.00416.83
7.2.100.0090.00316.72
7.2.90.0030.01016.80
7.2.80.0000.01016.80
7.2.70.0100.00317.02
7.2.60.0090.00317.02
7.2.50.0060.00617.12
7.2.40.0000.01116.95
7.2.30.0080.00417.07
7.2.20.0060.00616.91
7.2.10.0050.00517.16
7.2.00.0040.00918.20
7.1.250.0030.00716.05
7.1.100.0080.00417.98
7.1.70.0050.00517.14
7.1.60.0100.01319.50
7.1.50.0070.00416.76
7.1.00.0070.07322.28
7.0.200.0050.00317.10
7.0.60.0070.04019.95
7.0.50.0030.08017.92
7.0.40.0070.04319.91
7.0.30.0300.05320.17
7.0.20.0200.04320.04
7.0.10.0130.08320.12
7.0.00.0100.08020.00
5.6.280.0000.07720.89
5.6.210.0100.03320.69
5.6.200.0170.07018.13
5.6.190.0100.05020.61
5.6.180.0300.04020.36
5.6.170.0070.05020.49
5.6.160.0030.05020.44
5.6.150.0170.07318.22
5.6.140.0100.08018.12
5.6.130.0070.04018.20
5.6.120.0100.08020.99
5.6.110.0030.08721.00
5.6.100.0030.04321.03
5.6.90.0100.08321.00
5.6.80.0070.07020.39
5.5.350.4300.04320.52
5.5.340.0100.07318.02
5.5.330.0030.06720.29
5.5.320.0570.07320.41
5.5.310.0230.03320.23
5.5.300.0070.04017.93
5.5.290.0070.04717.94
5.5.280.0070.08020.88
5.5.270.0030.05720.86
5.5.260.0170.07020.97
5.5.250.0030.08020.62
5.5.240.0270.07320.22
5.4.450.3000.03319.11
5.4.440.2600.04319.13
5.4.430.4200.03719.40
5.4.420.3670.04719.25
5.4.410.3830.03719.43
5.4.400.3600.03719.03
5.4.390.3670.03718.92
5.4.380.4030.04019.23
5.4.370.5070.03318.80
5.4.360.3900.03319.05
5.4.350.3430.03319.25
5.4.340.3200.04019.13
5.4.320.3600.03719.09
5.4.310.3530.04019.09
5.4.300.4070.03019.05
5.4.290.3100.04019.08
5.4.280.3700.03719.25
5.4.270.3870.03719.13
5.4.260.3270.03719.08
5.4.250.3370.03319.09
5.4.240.3230.04019.23
5.4.230.4100.03718.78
5.4.220.3430.03718.92
5.4.210.4230.03318.87
5.4.200.3270.03719.07
5.4.190.4130.03719.22
5.4.180.4170.03019.07
5.4.170.3770.03718.91
5.4.160.3730.04319.07
5.4.150.4270.03019.07
5.4.140.3930.03316.21
5.4.130.3600.03716.48
5.4.120.4100.03716.49
5.4.110.3470.04016.43
5.4.100.3070.03316.27
5.4.90.4230.02716.49
5.4.80.3600.03316.26
5.4.70.3770.03316.43
5.4.60.3130.03716.37
5.4.50.3200.03716.41
5.4.40.2600.03716.18
5.4.30.3000.03316.39
5.4.20.3470.03716.30
5.4.10.3230.03316.30
5.4.00.3400.03715.78
5.3.290.3430.03714.71
5.3.280.3830.03014.54
5.3.270.3570.04014.55
5.3.260.5030.03014.46
5.3.250.4070.04014.54
5.3.240.4200.03314.65
5.3.230.3570.04014.43
5.3.220.3400.04014.52
5.3.210.4430.04314.40
5.3.200.4130.03714.50
5.3.190.4170.03314.53
5.3.180.3400.03714.49
5.3.170.4000.02714.40
5.3.160.3870.04014.47
5.3.150.3600.03714.54
5.3.140.3670.04014.43
5.3.130.3230.03714.53
5.3.120.2830.03314.39
5.3.110.2970.03014.38
5.3.100.3830.03713.89
5.3.90.2700.03713.98
5.3.80.3300.03713.89
5.3.70.2970.03314.07
5.3.60.3000.03013.78
5.3.50.2630.03713.90
5.3.40.3170.03713.76
5.3.30.3000.03313.74
5.3.20.2500.02713.48
5.3.10.3430.03013.44
5.3.00.3270.03313.66
5.2.170.2570.03711.19
5.2.160.2370.03011.08
5.2.150.2700.02710.98
5.2.140.2200.02711.08
5.2.130.2670.02711.11
5.2.120.2600.03311.25
5.2.110.2770.03311.14
5.2.100.2770.02310.95
5.2.90.2600.02710.94
5.2.80.3170.03011.03
5.2.70.2730.02310.95
5.2.60.3100.03011.06
5.2.50.4000.03310.86
5.2.40.2870.03310.84
5.2.30.2870.03010.81
5.2.20.2370.03010.96
5.2.10.3030.02010.95
5.2.00.2870.03010.61
5.1.60.2200.02710.07
5.1.50.2600.02310.15
5.1.40.2270.02010.02
5.1.30.2870.02310.30
5.1.20.3000.02310.34
5.1.10.2370.0239.95
5.1.00.2400.03010.16
5.0.50.1570.0178.51
5.0.40.1530.0208.51
5.0.30.0770.0338.51
5.0.20.1300.0238.51
5.0.10.1270.0238.51
5.0.00.1000.0438.51
4.4.90.1500.0178.51
4.4.80.1330.0208.51
4.4.70.1470.0178.51
4.4.60.1400.0108.51
4.4.50.0970.0138.51
4.4.40.1570.0238.51
4.4.30.1500.0178.51
4.4.20.1270.0208.51
4.4.10.0970.0238.51
4.4.00.1300.0238.51
4.3.110.1530.0178.51
4.3.100.1600.0178.51
4.3.90.0900.0178.51
4.3.80.1330.0308.51
4.3.70.1400.0138.51
4.3.60.1670.0108.51
4.3.50.1270.0278.51
4.3.40.0600.0338.51
4.3.30.0630.0208.51
4.3.20.0670.0178.51
4.3.10.0600.0178.51
4.3.00.0800.0208.51

preferences:
34.3 ms | 403 KiB | 5 Q