3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str_date = '12.31.2018'; try{ if($valid = (new \DateTime($str_date))){ echo $valid->getTimeStamp(); } } catch(Exception $e){ try { $str_date = (str_replace('.','/',$str_date)); if($valid = (new \DateTime($str_date))){ echo $valid->getTimeStamp(); } } catch(Exception $e){ echo $e->getMessage(); } } ?>

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.4.20.0140.00717.89
8.4.10.0060.00319.66
8.3.150.0150.00316.76
8.3.140.0040.00416.68
8.3.130.0060.00316.92
8.3.120.0040.00418.82
8.3.110.0060.00320.94
8.3.100.0090.00916.79
8.3.90.0050.00326.77
8.3.80.0030.00717.97
8.3.70.0120.00318.43
8.3.60.0070.00718.31
8.3.50.0060.00618.32
8.3.40.0080.00819.25
8.3.30.0040.01218.92
8.3.20.0050.00319.11
8.3.10.0040.00421.90
8.3.00.0080.00023.65
8.2.270.0060.01219.11
8.2.260.0060.00318.40
8.2.250.0060.00316.96
8.2.240.0060.00318.88
8.2.230.0070.00022.58
8.2.220.0180.00437.54
8.2.210.0000.00826.77
8.2.200.0060.00318.43
8.2.190.0160.00617.00
8.2.180.0200.00018.66
8.2.170.0110.00422.96
8.2.160.0150.00019.19
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0040.00419.73
8.2.120.0060.00326.35
8.2.110.0070.00320.54
8.2.100.0110.00018.03
8.2.90.0080.00017.97
8.2.80.0030.00617.97
8.2.70.0060.00318.03
8.2.60.0080.00018.05
8.2.50.0060.00318.10
8.2.40.0050.00321.18
8.2.30.0040.00419.33
8.2.20.0000.00818.19
8.2.10.0000.00719.45
8.2.00.0070.00019.43
8.1.310.0120.00618.25
8.1.300.0100.00016.55
8.1.290.0030.00630.84
8.1.280.0120.00925.92
8.1.270.0000.00822.05
8.1.260.0070.00026.35
8.1.250.0080.00028.09
8.1.240.0080.00320.76
8.1.230.0070.00320.97
8.1.220.0070.00017.77
8.1.210.0060.00318.92
8.1.200.0040.00417.48
8.1.190.0130.00017.38
8.1.180.0000.00818.10
8.1.170.0040.00418.77
8.1.160.0030.00618.76
8.1.150.0000.00718.86
8.1.140.0040.00417.62
8.1.130.0050.00318.96
8.1.120.0040.00417.52
8.1.110.0000.00917.58
8.1.100.0000.00817.55
8.1.90.0000.00817.49
8.1.80.0000.00717.58
8.1.70.0030.00617.44
8.1.60.0030.00617.68
8.1.50.0000.00817.69
8.1.40.0050.00317.58
8.1.30.0000.00817.72
8.1.20.0040.00417.61
8.1.10.0000.00717.68
8.1.00.0040.00417.62
8.0.300.0040.00420.04
8.0.290.0070.00017.00
8.0.280.0000.00718.52
8.0.270.0030.00317.33
8.0.260.0030.00317.34
8.0.250.0030.00317.27
8.0.240.0000.00917.13
8.0.230.0080.00017.16
8.0.220.0020.00516.97
8.0.210.0000.00717.00
8.0.200.0000.00717.17
8.0.190.0000.00817.14
8.0.180.0000.00717.13
8.0.170.0040.00417.15
8.0.160.0000.00717.15
8.0.150.0020.00516.95
8.0.140.0040.00417.01
8.0.130.0050.00013.43
8.0.120.0040.00416.91
8.0.110.0040.00417.11
8.0.100.0080.00017.15
8.0.90.0040.00417.04
8.0.80.0090.00817.10
8.0.70.0040.00417.16
8.0.60.0040.00417.04
8.0.50.0020.00517.06
8.0.30.0090.01017.18
8.0.20.0090.00917.40
8.0.10.0040.00417.03
8.0.00.0060.01216.92
7.4.330.0060.00015.55
7.4.320.0030.00316.68
7.4.300.0060.00016.76
7.4.290.0030.00316.63
7.4.280.0080.00016.69
7.4.270.0000.00716.66
7.4.260.0060.00316.53
7.4.250.0050.00316.66
7.4.240.0000.00716.70
7.4.230.0070.00016.64
7.4.220.0060.00316.47
7.4.210.0090.00916.76
7.4.200.0030.00316.77
7.4.160.0070.01216.77
7.4.140.0150.01017.86
7.4.130.0150.01116.63
7.4.120.0120.00716.70
7.4.110.0110.00616.55
7.4.100.0170.00016.60
7.4.90.0000.01716.53
7.4.80.0130.01019.39
7.4.70.0060.01316.96
7.4.60.0110.00516.90
7.4.50.0100.00216.72
7.4.40.0090.00916.77
7.4.00.0110.00615.11
7.3.330.0050.00013.23
7.3.320.0030.00313.31
7.3.310.0030.00316.49
7.3.300.0020.00516.29
7.3.290.0050.00216.24
7.3.280.0080.00716.42
7.3.260.0110.00716.44
7.3.240.0110.00716.57
7.3.230.0040.01216.55
7.3.210.0100.00716.32
7.3.200.0000.01716.71
7.3.190.0100.00716.47
7.3.180.0000.01716.57
7.3.170.0070.01416.54
7.3.160.0100.00716.63
7.3.120.0040.01415.06
7.3.110.0030.01415.10
7.3.100.0040.01114.95
7.3.90.0070.00414.91
7.3.80.0000.01115.19
7.3.70.0070.01014.91
7.3.60.0090.00914.98
7.3.50.0100.00715.10
7.3.40.0100.00014.92
7.3.30.0040.01114.82
7.3.20.0060.00316.86
7.3.10.0090.00616.48
7.3.00.0030.01016.69
7.2.330.0110.00716.96
7.2.320.0110.00816.61
7.2.310.0090.01316.82
7.2.300.0030.01316.89
7.2.290.0080.01216.76
7.2.250.0040.01514.97
7.2.240.0130.00715.01
7.2.230.0060.00915.15
7.2.220.0100.00714.96
7.2.210.0040.01115.18
7.2.200.0060.00915.25
7.2.190.0090.00615.19
7.2.180.0080.00414.93
7.2.170.0040.01115.17
7.2.70.0150.00716.21
7.2.60.0140.01216.16
7.2.50.0160.00716.13
7.2.40.0580.01315.96
7.2.30.0170.01016.26
7.2.20.0170.00516.10
7.2.10.0120.00916.26
7.2.00.0140.00916.16
7.1.330.0040.01215.95
7.1.320.0060.00915.91
7.1.310.0070.00716.01
7.1.300.0070.01015.57
7.1.290.0080.00615.80
7.1.280.0040.00815.69
7.1.270.0090.00615.96
7.1.260.0050.00515.73
7.1.200.0030.01015.88
7.1.170.0150.00515.03
7.1.160.0130.00614.88
7.1.150.0160.00314.96
7.1.140.0100.01214.88
7.1.130.0120.01014.89
7.1.120.0120.01014.90
7.1.110.0150.00915.12
7.1.100.0180.00715.10
7.1.90.0100.00914.94
7.1.80.0110.01114.92
7.1.70.0160.00614.93
7.1.60.0300.01232.93
7.1.50.0370.01132.88
7.1.40.0350.00832.88
7.1.30.0380.00733.01
7.1.20.0340.00332.89
7.1.10.0140.00414.95
7.1.00.0120.00715.10

preferences:
28.07 ms | 403 KiB | 5 Q