3v4l.org

run code in 300+ PHP versions simultaneously
<?php $datestring = "08-28-2018 06:33 PM"; $input_format = "m-d-Y h:i A"; $output_format = 'Y-m-d G:i'; $date = DateTime::createFromFormat($input_format, $datestring); echo $date->format($output_format). "\n"; //output 2018-08-28 18:33

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.5.10.0060.00216.66
8.5.00.0100.01119.99
8.4.150.0090.00416.83
8.4.140.0100.01317.60
8.4.130.0020.00618.64
8.4.120.0090.01123.81
8.4.110.0120.00818.95
8.4.100.0080.01118.84
8.4.90.0040.00620.48
8.4.80.0110.01018.76
8.4.70.0070.01017.87
8.4.60.0140.00719.03
8.4.50.0140.00719.49
8.4.40.0150.00617.61
8.4.30.0070.01019.84
8.4.20.0100.01018.91
8.4.10.0120.00619.55
8.3.280.0100.00920.81
8.3.270.0080.01116.61
8.3.260.0090.01116.47
8.3.250.0100.00818.87
8.3.240.0130.00617.03
8.3.230.0150.00516.84
8.3.220.0120.00818.69
8.3.210.0130.00618.42
8.3.200.0060.00516.59
8.3.190.0130.00517.08
8.3.180.0110.00616.73
8.3.170.0150.00418.90
8.3.160.0090.00918.48
8.3.150.0070.01120.66
8.3.140.0060.00316.68
8.3.130.0120.00318.47
8.3.120.0040.01218.90
8.3.110.0100.00020.94
8.3.100.0070.00318.37
8.3.90.0040.01516.51
8.3.80.0050.00516.38
8.3.70.0070.01416.58
8.3.60.0090.00618.30
8.3.50.0110.00818.15
8.3.40.0110.00718.78
8.3.30.0070.00718.59
8.3.20.0000.01519.22
8.3.10.0080.00023.66
8.3.00.0000.00722.51
8.2.290.0080.01020.65
8.2.280.0110.00918.54
8.2.270.0090.00917.46
8.2.260.0170.00020.72
8.2.250.0080.00416.80
8.2.240.0000.00919.00
8.2.230.0060.00322.58
8.2.220.0000.00824.06
8.2.210.0000.00826.77
8.2.200.0040.00418.29
8.2.190.0140.00416.75
8.2.180.0170.00325.92
8.2.170.0080.00822.96
8.2.160.0070.00719.29
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0050.00319.77
8.2.110.0060.00320.21
8.2.100.0040.00717.91
8.2.90.0030.00517.75
8.2.80.0000.00819.08
8.2.70.0040.00418.03
8.2.60.0040.00418.28
8.2.50.0080.00319.48
8.2.40.0050.00321.13
8.2.30.0060.00319.96
8.2.20.0050.00217.98
8.2.10.0040.00418.19
8.2.00.0050.00219.36
8.1.330.0150.00521.95
8.1.320.0090.00917.90
8.1.310.0140.00416.59
8.1.300.0060.01318.57
8.1.290.0120.00030.84
8.1.280.0070.01125.92
8.1.270.0050.00323.99
8.1.260.0060.01326.35
8.1.250.0080.00028.09
8.1.240.0120.00018.60
8.1.230.0110.00017.89
8.1.220.0040.00417.91
8.1.210.0000.00818.77
8.1.200.0030.00617.38
8.1.190.0050.00317.35
8.1.180.0020.00518.84
8.1.170.0050.00518.77
8.1.160.0000.00818.85
8.1.150.0040.00418.86
8.1.140.0070.00420.91
8.1.130.0000.00818.95
8.1.120.0080.00017.47
8.1.110.0070.00017.57
8.1.100.0030.00517.61
8.1.90.0070.00317.57
8.1.80.0040.00517.48
8.1.70.0070.00317.51
8.1.60.0030.00517.54
8.1.50.0000.00717.59
8.1.40.0030.00517.55
8.1.30.0070.00417.67
8.1.20.0030.00617.72
8.1.10.0030.00517.57
8.1.00.0040.00417.67
8.0.300.0000.00818.91
8.0.290.0060.00316.63
8.0.280.0030.00318.50
8.0.270.0000.00917.32
8.0.260.0090.00021.96
8.0.250.0030.00317.02
8.0.240.0000.00717.02
8.0.230.0040.00417.13
8.0.220.0030.00617.05
8.0.210.0030.00317.12
8.0.200.0040.00417.15
8.0.190.0000.00717.20
8.0.180.0000.00917.17
8.0.170.0040.00416.99
8.0.160.0030.00317.16
8.0.150.0070.00017.03
8.0.140.0060.00316.92
8.0.130.0030.00313.39
8.0.120.0040.00417.05
8.0.110.0020.00517.03
8.0.100.0040.00417.02
8.0.90.0040.00417.02
8.0.80.0050.01317.04
8.0.70.0040.00417.17
8.0.60.0040.00416.96
8.0.50.0080.00017.03
8.0.30.0090.01117.17
8.0.20.0080.00917.40
8.0.10.0050.00316.94
8.0.00.0130.00516.88
7.4.330.0020.00215.55
7.4.320.0000.00616.58
7.4.300.0000.00616.67
7.4.290.0030.00316.62
7.4.280.0040.00416.54
7.4.270.0000.00716.64
7.4.260.0000.00816.48
7.4.250.0030.00316.51
7.4.240.0040.00416.67
7.4.230.0040.00316.32
7.4.220.0070.00016.50
7.4.210.0070.00916.61
7.4.200.0000.00716.61
7.4.160.0100.00816.57
7.4.140.0110.00817.86
7.4.130.0070.01016.75
7.4.120.0130.00816.56
7.4.110.0100.01616.60
7.4.100.0130.00416.55
7.4.90.0030.01716.45
7.4.80.0100.00619.39
7.4.70.0060.01216.71
7.4.60.0110.01016.61
7.4.50.0140.00316.41
7.4.40.0120.00816.71
7.4.00.0070.00714.98
7.3.330.0030.00313.01
7.3.320.0030.00313.18
7.3.310.0000.00616.20
7.3.300.0000.00716.12
7.3.290.0000.00816.25
7.3.280.0090.01216.29
7.3.260.0140.00716.40
7.3.240.0100.01116.50
7.3.230.0030.01316.31
7.3.210.0120.00616.62
7.3.200.0100.00616.72
7.3.190.0140.00616.53
7.3.180.0190.00016.25
7.3.170.0150.00916.30
7.3.160.0130.00316.47
7.2.330.0090.00916.35
7.2.320.0060.01016.60
7.2.310.0100.01316.95
7.2.300.0120.00616.85
7.2.290.0120.00316.77
7.2.90.0780.00314.62
7.2.80.0110.00514.58
7.2.70.0230.01015.30
7.2.60.0120.00615.16
7.2.50.0690.00614.73
7.2.40.0220.00415.12
7.2.30.1900.00314.82
7.2.20.0200.00015.02
7.2.10.0120.00915.17
7.2.00.1820.00315.07
7.1.210.0060.00613.57
7.1.200.0110.01114.01
7.1.190.0100.00713.78
7.1.180.0340.00414.11
7.1.170.1600.00313.79
7.1.160.0070.00713.61
7.1.150.0890.00713.76
7.1.140.1710.00913.89
7.1.130.0100.01014.17
7.1.120.0900.00313.82
7.1.110.0100.00714.13
7.1.100.0230.00613.71
7.1.90.0370.00313.80
7.1.80.0090.00914.00
7.1.70.0090.00913.77
7.1.60.2250.00732.09
7.1.50.4820.00731.92
7.1.40.4300.01031.49
7.1.30.4020.01331.76
7.1.20.0330.00331.96
7.1.10.0240.01013.76
7.1.00.1070.00713.76

preferences:
32.39 ms | 403 KiB | 5 Q