3v4l.org

run code in 300+ PHP versions simultaneously
<?php function createDateFromFormat($format, $time) { $result = \DateTimeImmutable::createFromFormat($format, $time); if (!$result || \DateTimeImmutable::getLastErrors()['warning_count']) { return false; } return $result; } var_dump(\DateTimeImmutable::createFromFormat('Y-m-d', '2005-12-1')); var_dump(\DateTimeImmutable::createFromFormat('Y-m-d', '2005')); // should be false var_dump(\DateTimeImmutable::createFromFormat('Y-m-d', '0-0-0')); // should be false var_dump(createDateFromFormat('Y-m-d', '2005-12-1')); var_dump(createDateFromFormat('Y-m-d', '2005')); // should be false var_dump(createDateFromFormat('Y-m-d', '0-0-0')); // should be false

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.0070.01118.56
8.3.50.0140.00016.63
8.3.40.0000.01519.17
8.3.30.0070.00718.95
8.3.20.0070.00020.16
8.3.10.0080.00021.90
8.3.00.0040.00420.89
8.2.180.0120.00918.66
8.2.170.0110.00422.96
8.2.160.0090.00622.20
8.2.150.0040.00824.18
8.2.140.0040.00424.66
8.2.130.0050.00322.01
8.2.120.0080.00026.35
8.2.110.0070.00420.35
8.2.100.0090.00318.09
8.2.90.0040.00419.20
8.2.80.0030.00518.16
8.2.70.0050.00317.73
8.2.60.0040.00417.93
8.2.50.0000.00818.10
8.2.40.0000.00822.03
8.2.30.0030.00619.52
8.2.20.0050.00518.14
8.2.10.0020.00518.08
8.2.00.0070.00018.13
8.1.280.0100.00725.92
8.1.270.0040.00422.08
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00320.71
8.1.230.0080.00419.01
8.1.220.0080.00017.91
8.1.210.0040.00418.77
8.1.200.0030.00717.25
8.1.190.0050.00317.22
8.1.180.0040.00418.10
8.1.170.0030.00518.47
8.1.160.0030.00318.99
8.1.150.0000.00820.60
8.1.140.0000.00819.69
8.1.130.0000.00718.95
8.1.120.0000.01017.52
8.1.110.0040.00417.55
8.1.100.0040.00417.48
8.1.90.0070.00017.50
8.1.80.0000.00717.61
8.1.70.0000.00717.55
8.1.60.0050.00317.54
8.1.50.0040.00417.64
8.1.40.0040.00417.57
8.1.30.0080.00017.63
8.1.20.0040.00417.71
8.1.10.0040.00417.61
8.1.00.0040.00417.62
8.0.300.0070.00018.77
8.0.290.0070.00016.88
8.0.280.0030.00518.52
8.0.270.0040.00417.34
8.0.260.0030.00317.09
8.0.250.0030.00317.16
8.0.240.0000.00716.93
8.0.230.0100.00017.05
8.0.220.0070.00017.01
8.0.210.0040.00416.95
8.0.200.0030.00317.08
8.0.190.0000.00817.16
8.0.180.0000.01217.14
8.0.170.0030.00517.15
8.0.160.0030.00617.15
8.0.150.0040.00417.08
8.0.140.0000.00717.02
8.0.130.0000.00713.38
8.0.120.0000.00717.07
8.0.110.0080.00017.01
8.0.100.0000.00716.99
8.0.90.0040.00417.16
8.0.80.0130.00317.13
8.0.70.0000.00717.13
8.0.60.0000.00816.95
8.0.50.0050.00316.97
8.0.30.0120.01017.33
8.0.20.0110.01317.40
8.0.10.0030.00317.25
8.0.00.0080.01516.80
7.4.330.0050.00015.55
7.4.320.0030.00316.56
7.4.300.0030.00316.57
7.4.290.0000.01116.48
7.4.280.0000.00816.48
7.4.270.0070.00016.59
7.4.260.0040.00716.71
7.4.250.0030.00316.68
7.4.240.0030.00316.66
7.4.230.0030.00316.70
7.4.220.0180.00316.71
7.4.210.0030.01316.70
7.4.200.0000.00716.56
7.4.160.0100.01016.54
7.4.150.0140.00717.40
7.4.140.0120.00817.86
7.4.130.0090.01216.71
7.4.120.0100.00916.65
7.4.110.0130.00616.47
7.4.100.0140.00516.55
7.4.90.0100.01416.43
7.4.80.0060.01219.39
7.4.70.0070.01416.87
7.4.60.0060.01116.55
7.4.50.0000.01416.59
7.4.40.0100.00716.74
7.4.30.0080.01316.81
7.4.00.0030.01415.27
7.3.330.0060.00013.27
7.3.320.0000.00513.43
7.3.310.0000.00716.22
7.3.300.0000.00716.39
7.3.290.0080.00716.45
7.3.280.0090.00816.42
7.3.270.0130.00617.40
7.3.260.0070.01016.69
7.3.250.0100.01116.58
7.3.240.0090.00816.62
7.3.230.0130.01116.70
7.3.210.0030.01516.40
7.3.200.0030.01716.67
7.3.190.0090.00916.46
7.3.180.0160.01016.68
7.3.170.0080.00816.71
7.3.160.0080.00916.73
7.2.330.0090.01117.01
7.2.320.0060.01316.86
7.2.310.0040.01417.00
7.2.300.0100.01416.93
7.2.290.0140.00716.64
7.2.60.0040.01117.10
7.1.200.0070.00715.91
7.1.70.0090.00617.03
7.1.60.0050.01017.37
7.1.50.0080.00817.25
7.1.40.0040.01116.73
7.1.30.0050.01416.67
7.1.20.0070.01717.06
7.1.10.0090.00616.81
7.1.00.0000.01016.70
7.0.200.0070.00516.66
7.0.190.0090.00216.48
7.0.180.0040.01216.36
7.0.170.0080.00416.36
7.0.160.0130.00316.16
7.0.150.0090.00616.34
7.0.140.0060.00616.28
7.0.130.0100.00516.50
7.0.120.0130.00016.57
7.0.110.0040.00916.29
7.0.100.0030.00916.15
7.0.90.0140.00016.48
7.0.80.0060.00616.32
7.0.70.0080.00316.25
7.0.60.0040.00716.18
7.0.50.0080.00316.41
7.0.40.0080.00615.12
7.0.30.0000.01015.12
7.0.20.0070.00715.12
7.0.10.0050.00515.12
7.0.00.0000.00915.12

preferences:
36.75 ms | 400 KiB | 5 Q