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', '99-1-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.0120.00617.00
8.3.50.0140.00316.36
8.3.40.0060.00919.11
8.3.30.0110.00418.93
8.3.20.0000.00820.21
8.3.10.0000.00821.82
8.3.00.0080.00020.89
8.2.180.0070.01118.67
8.2.170.0040.01422.96
8.2.160.0070.01122.08
8.2.150.0080.00025.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0000.00821.06
8.2.110.0000.00920.58
8.2.100.0060.00618.09
8.2.90.0050.00319.17
8.2.80.0030.00518.03
8.2.70.0090.00017.75
8.2.60.0040.00418.16
8.2.50.0000.00818.10
8.2.40.0030.00622.08
8.2.30.0000.00819.42
8.2.20.0060.00318.14
8.2.10.0030.00618.18
8.2.00.0040.00418.23
8.1.280.0070.00725.92
8.1.270.0050.00324.66
8.1.260.0080.00026.35
8.1.250.0000.00728.09
8.1.240.0030.00620.84
8.1.230.0000.01119.04
8.1.220.0050.00317.78
8.1.210.0060.00318.77
8.1.200.0060.00317.11
8.1.190.0000.00817.35
8.1.180.0000.00818.10
8.1.170.0050.00318.54
8.1.160.0040.00418.99
8.1.150.0080.00020.73
8.1.140.0040.00419.68
8.1.130.0000.00718.88
8.1.120.0040.00417.63
8.1.110.0000.00717.46
8.1.100.0000.00717.64
8.1.90.0050.00317.54
8.1.80.0040.00417.61
8.1.70.0030.00317.61
8.1.60.0040.00417.54
8.1.50.0050.00317.57
8.1.40.0080.00017.55
8.1.30.0000.00717.59
8.1.20.0040.00417.62
8.1.10.0050.00317.63
8.1.00.0000.00817.46
8.0.300.0060.00318.77
8.0.290.0000.00716.88
8.0.280.0050.00318.61
8.0.270.0000.00717.35
8.0.260.0000.00717.12
8.0.250.0040.00417.15
8.0.240.0070.00017.06
8.0.230.0000.00817.13
8.0.220.0040.00417.13
8.0.210.0000.00716.98
8.0.200.0000.00817.04
8.0.190.0060.00317.20
8.0.180.0000.00717.03
8.0.170.0040.00417.13
8.0.160.0050.00317.07
8.0.150.0000.00717.06
8.0.140.0040.00716.95
8.0.130.0030.00513.45
8.0.120.0040.00416.97
8.0.110.0040.00417.11
8.0.100.0070.00017.08
8.0.90.0040.00417.21
8.0.80.0110.00417.08
8.0.70.0000.00717.13
8.0.60.0040.00416.90
8.0.50.0040.00417.13
8.0.30.0090.01017.14
8.0.20.0150.01217.40
8.0.10.0070.00017.09
8.0.00.0040.01417.00
7.4.330.0000.00415.55
7.4.320.0000.00716.51
7.4.300.0030.00316.66
7.4.290.0000.00716.67
7.4.280.0030.00616.49
7.4.270.0030.00316.60
7.4.260.0050.00316.49
7.4.250.0060.00316.52
7.4.240.0040.00416.57
7.4.230.0000.00716.64
7.4.220.0140.01316.73
7.4.210.0070.01316.66
7.4.200.0080.00016.70
7.4.160.0120.00816.68
7.4.150.0140.00417.40
7.4.140.0100.01017.86
7.4.130.0080.01216.54
7.4.120.0080.01316.63
7.4.110.0090.00916.61
7.4.100.0130.00716.46
7.4.90.0150.00416.59
7.4.80.0120.00919.39
7.4.70.0110.01116.54
7.4.60.0110.00416.72
7.4.50.0120.00616.47
7.4.40.0090.01216.51
7.4.30.0110.01116.62
7.4.00.0100.00715.14
7.3.330.0050.00213.45
7.3.320.0000.00513.25
7.3.310.0080.00016.50
7.3.300.0030.00616.33
7.3.290.0110.00616.40
7.3.280.0100.00716.42
7.3.270.0120.00617.40
7.3.260.0200.01416.66
7.3.250.0100.01216.56
7.3.240.0130.00516.54
7.3.230.0000.01616.70
7.3.210.0030.01316.70
7.3.200.0100.01016.50
7.3.190.0130.00316.44
7.3.180.0100.00716.52
7.3.170.0080.01116.70
7.3.160.0080.00816.62
7.3.120.0050.01015.13
7.3.110.0090.00514.89
7.3.100.0050.00914.90
7.3.90.0070.00815.03
7.3.80.0080.00715.28
7.3.70.0080.00514.99
7.3.60.0020.01215.01
7.3.50.0030.01214.91
7.3.40.0090.00514.69
7.3.30.0070.00514.88
7.3.20.0050.00916.67
7.3.10.0050.01216.61
7.3.00.0090.00216.67
7.2.330.0100.01016.89
7.2.320.0100.01016.73
7.2.310.0090.00916.93
7.2.300.0090.00916.89
7.2.290.0160.00316.91
7.2.240.0110.00615.14
7.2.230.0090.00515.38
7.2.220.0120.00414.96
7.2.210.0070.01015.14
7.2.200.0030.01215.11
7.2.190.0040.01115.06
7.2.180.0120.00215.08
7.2.170.0090.00615.09
7.2.160.0050.00815.23
7.2.150.0020.01216.88
7.2.140.0020.01016.98
7.2.130.0070.00916.90
7.2.120.0080.00817.04
7.2.110.0060.00816.84
7.2.100.0070.00716.87
7.2.90.0060.00916.86
7.2.80.0090.00516.89
7.2.70.0120.00617.08
7.2.60.0090.00817.07
7.2.50.0070.00816.89
7.2.40.0070.00916.93
7.2.30.0040.01016.93
7.2.20.0060.00616.86
7.2.10.0060.00816.98
7.2.00.0040.01017.49
7.1.330.0050.01216.01
7.1.320.0090.00815.87
7.1.310.0100.00515.89
7.1.300.0060.00615.73
7.1.290.0030.00916.02
7.1.280.0040.00815.85
7.1.270.0060.00615.94
7.1.260.0080.00715.97
7.1.250.0030.01015.94
7.1.230.0150.00315.57
7.1.220.0120.00915.81
7.1.210.0190.00016.01
7.1.200.0100.00715.60
7.1.190.0100.00715.80
7.1.180.0060.01016.11
7.1.170.0030.01215.90
7.1.160.0030.01015.99
7.1.150.0060.00916.08
7.1.140.0080.00515.95
7.1.130.0030.00915.81
7.1.120.0090.00615.68
7.1.110.0060.00616.08
7.1.100.0040.00716.88
7.1.90.0000.01515.31
7.1.80.0150.00615.60
7.1.70.0060.00816.53
7.1.60.0330.00924.41
7.1.50.0300.01024.54
7.1.40.0300.01324.34
7.1.30.0860.01024.41
7.1.20.0350.00824.61
7.1.10.0180.01015.47
7.1.00.0290.00315.30
7.0.310.0160.00715.09
7.0.300.0090.00915.63
7.0.290.0140.00615.63
7.0.280.0120.00615.56
7.0.270.0160.00315.55
7.0.260.0170.00015.52
7.0.250.0090.00915.17
7.0.240.0030.01015.59
7.0.230.0170.00415.26
7.0.220.0120.00615.58
7.0.210.0120.00915.27
7.0.200.0250.01015.37
7.0.190.0280.00615.23
7.0.180.0220.01014.86
7.0.170.0260.00815.14
7.0.160.0230.00814.92
7.0.150.0260.00515.01
7.0.140.0250.00714.72
7.0.130.0180.01315.16
7.0.120.0250.00615.15
7.0.110.0400.00714.90
7.0.100.0550.00814.91
7.0.90.0250.00814.93
7.0.80.0200.01014.97
7.0.70.0200.01114.80
7.0.60.0370.00514.80
7.0.50.0200.01214.91
7.0.40.0250.00514.00
7.0.30.0210.00914.06
7.0.20.0200.01313.92
7.0.10.0230.01214.13
7.0.00.0240.00914.06
5.6.380.0000.01214.04

preferences:
57.78 ms | 401 KiB | 5 Q