3v4l.org

run code in 300+ PHP versions simultaneously
<?php $schedule = '31/03/2011 01:22 pm'; // %Y, %m and %d correspond to date()'s Y m and d. // %I corresponds to H, %M to i and %p to a $ugly = strptime($schedule, '%d/%m/%Y %I:%M %p'); $ymd = sprintf( // This is a format string that takes six total decimal // arguments, then left-pads them with zeros to either // 4 or 2 characters, as needed '%04d-%02d-%02d %02d:%02d:%02d', $ugly['tm_year'] + 1900, // This will be "111", so we need to add 1900. $ugly['tm_mon'] + 1, // This will be the month minus one, so we add one. $ugly['tm_mday'], $ugly['tm_hour'], $ugly['tm_min'], $ugly['tm_sec'] ); echo $ymd; $new_schedule = new DateTime($ymd); echo $new_schedule->format('Y-m-d H:i:s'); ?>

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.70.0120.00916.85
8.3.60.0080.00818.57
8.3.50.0120.00522.17
8.3.40.0060.01219.09
8.3.30.0110.00319.09
8.3.20.0040.00420.29
8.3.10.0000.00822.05
8.3.00.0000.00822.51
8.2.180.0070.00716.88
8.2.170.0100.00722.96
8.2.160.0100.00719.16
8.2.150.0000.00824.18
8.2.140.0050.00324.66
8.2.130.0100.00726.16
8.2.120.0080.00019.73
8.2.110.0090.00021.18
8.2.100.0060.00617.97
8.2.90.0040.00418.16
8.2.80.0000.00817.97
8.2.70.0040.00417.74
8.2.60.0090.00317.80
8.2.50.0060.00318.07
8.2.40.0030.00618.22
8.2.30.0000.00818.08
8.2.20.0040.00418.03
8.2.10.0040.00417.88
8.2.00.0000.00717.96
8.1.280.0130.00325.92
8.1.270.0050.00322.23
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0090.00022.14
8.1.230.0060.00620.89
8.1.220.0080.00017.78
8.1.210.0030.00620.05
8.1.200.0080.00017.47
8.1.190.0040.00417.53
8.1.180.0080.00018.67
8.1.170.0040.00418.71
8.1.160.0030.00521.93
8.1.150.0040.00418.69
8.1.140.0060.00317.57
8.1.130.0000.00717.76
8.1.120.0030.00417.49
8.1.110.0040.00417.65
8.1.100.0040.00417.65
8.1.90.0000.00817.48
8.1.80.0000.00717.64
8.1.70.0070.00017.61
8.1.60.0000.00817.63
8.1.50.0040.00417.61
8.1.40.0070.00017.51
8.1.30.0030.00617.59
8.1.20.0000.00817.75
8.1.10.0080.00017.71
8.1.00.0040.00417.75
8.0.300.0030.00520.07
8.0.290.0030.00617.00
8.0.280.0080.00018.60
8.0.270.0040.00417.33
8.0.260.0030.00517.03
8.0.250.0000.00717.13
8.0.240.0070.00017.05
8.0.230.0070.00016.97
8.0.220.0040.00417.04
8.0.210.0000.00717.01
8.0.200.0000.00617.07
8.0.190.0080.00016.98
8.0.180.0000.01017.09
8.0.170.0040.00417.03
8.0.160.0040.00417.00
8.0.150.0030.00716.87
8.0.140.0030.00616.95
8.0.130.0060.00013.40
8.0.120.0040.00417.02
8.0.110.0040.00417.04
8.0.100.0000.00717.00
8.0.90.0040.00416.88
8.0.80.0130.00316.99
8.0.70.0040.00416.90
8.0.60.0030.00516.81
8.0.50.0040.00416.88
8.0.30.0100.00917.20
8.0.20.0130.00617.40
8.0.10.0050.00216.95
8.0.00.0090.00816.80
7.4.330.0000.00515.16
7.4.320.0000.00716.55
7.4.300.0040.00416.70
7.4.290.0030.00316.63
7.4.280.0050.00216.56
7.4.270.0070.00016.61
7.4.260.0040.00416.71
7.4.250.0080.00016.66
7.4.240.0040.00316.63
7.4.230.0000.00716.46
7.4.220.0090.00916.79
7.4.210.0080.00916.68
7.4.200.0030.00316.47
7.4.190.0030.00316.84
7.4.160.0130.00316.43
7.4.150.0140.00417.40
7.4.140.0100.00817.86
7.4.130.0140.00816.58
7.4.120.0110.00616.63
7.4.110.0070.01116.61
7.4.100.0070.01016.68
7.4.90.0080.00816.70
7.4.80.0090.01419.39
7.4.70.0070.01016.52
7.4.60.0120.00616.59
7.4.50.0050.00016.53
7.4.40.0130.00322.77
7.4.30.0040.01316.73
7.4.00.0050.01314.94
7.3.330.0000.00513.21
7.3.320.0000.00513.19
7.3.310.0050.00216.63
7.3.300.0060.00016.41
7.3.290.0070.00716.34
7.3.280.0090.00716.43
7.3.270.0110.00617.40
7.3.260.0070.01016.67
7.3.250.0130.00516.62
7.3.240.0040.01916.57
7.3.230.0100.00716.57
7.3.210.0030.01316.77
7.3.200.0110.00519.39
7.3.190.0110.01116.78
7.3.180.0100.00616.50
7.3.170.0100.00616.51
7.3.160.0120.00316.55
7.3.120.0060.00914.95
7.3.110.0070.01014.91
7.3.100.0130.00315.09
7.3.90.0100.00014.93
7.3.80.0030.01015.17
7.3.70.0040.01114.84
7.3.60.0000.01315.10
7.3.50.0000.00814.89
7.3.40.0070.00714.81
7.3.30.0030.00615.14
7.3.20.0030.00616.68
7.3.10.0030.01016.98
7.3.00.0060.00816.74
7.2.330.0160.00316.60
7.2.320.0060.01216.68
7.2.310.0030.01316.89
7.2.300.0060.01216.89
7.2.290.0090.00616.87
7.2.250.0060.01215.01
7.2.240.0000.02015.15
7.2.230.0090.00614.72
7.2.220.0060.00315.13
7.2.210.0030.00815.38
7.2.200.0140.00014.96
7.2.190.0080.00315.16
7.2.180.0030.01015.27
7.2.170.0060.00915.25
7.2.130.0030.01317.15
7.2.120.0000.01216.99
7.2.110.0040.00816.91
7.2.100.0030.00717.07
7.2.90.0070.00417.05
7.2.80.0060.00916.86
7.2.70.0060.00916.71
7.2.60.0030.01017.08
7.2.50.0030.00916.86
7.2.40.0060.00917.16
7.2.30.0080.00617.07
7.2.20.0000.01016.86
7.2.10.0040.00717.20
7.2.00.0040.00818.45
7.1.330.0040.00915.78
7.1.320.0110.00316.00
7.1.310.0000.01315.58
7.1.300.0060.00315.97
7.1.290.0100.00615.97
7.1.280.0040.01116.08
7.1.270.0060.00615.78
7.1.260.0050.00515.75
7.1.250.0060.00316.10
7.1.200.0100.00715.94
7.1.100.0070.00718.38
7.1.70.0040.00417.28
7.1.60.0030.01619.82
7.1.50.0100.01417.08
7.1.00.0070.06722.33
7.0.200.0000.00816.97
7.0.140.0030.07321.95
7.0.60.0070.07720.06
7.0.50.0070.03717.73
7.0.40.0100.07720.09
7.0.30.0200.04020.17
7.0.20.0300.07020.06
7.0.10.0070.04320.13
7.0.00.0130.07720.16
5.6.280.0100.06320.95
5.6.210.0030.10020.71
5.6.200.0070.05718.21
5.6.190.0070.09320.77
5.6.180.0270.04720.77
5.6.170.0370.06020.45
5.6.160.0070.04020.37
5.6.150.0270.06018.16
5.6.140.0100.07018.22
5.6.130.0070.04018.06
5.6.120.0070.08021.01
5.6.110.0070.08320.99
5.6.100.0170.07021.10
5.6.90.0100.07720.95
5.6.80.0070.07320.43
5.5.350.0130.07720.42
5.5.340.0070.08017.89
5.5.330.0100.06020.47
5.5.320.0030.07020.50
5.5.310.0370.05720.20
5.5.300.0100.07718.00
5.5.290.0130.03318.02
5.5.280.0070.07320.80
5.5.270.0000.05720.77
5.5.260.0130.07720.75
5.5.250.0100.07320.61
5.5.240.0070.07720.25
5.4.450.0300.04319.41
5.4.440.0230.03719.41
5.4.430.0200.03719.18
5.4.420.0230.05719.40
5.4.410.0130.04319.44
5.4.400.0300.04319.07
5.4.390.0200.07318.92
5.4.380.0170.04019.24
5.4.370.0330.06319.24
5.4.360.0170.05019.16
5.4.350.0230.06019.24
5.4.340.0270.07019.09
5.4.320.0230.07319.10
5.4.310.0270.03719.09
5.4.300.0270.07019.14
5.4.290.0170.06718.88
5.4.280.0270.06018.91
5.4.270.0200.04019.24
5.4.260.0270.06018.91
5.4.250.0270.06319.21
5.4.240.0270.07018.77
5.4.230.0200.03719.08
5.4.220.0200.04719.04
5.4.210.0200.03719.24
5.4.200.0270.07019.15
5.4.190.0270.06319.09
5.4.180.0230.07019.09
5.4.170.0200.04719.25
5.4.160.0300.05319.08
5.4.150.0330.05019.04
5.4.140.0330.05716.31
5.4.130.0200.04316.49
5.4.120.0130.04316.53
5.4.110.0170.06016.23
5.4.100.0270.06716.43
5.4.90.0200.05316.48
5.4.80.0270.06316.47
5.4.70.0200.04316.43
5.4.60.0200.05316.43
5.4.50.0270.04716.31
5.4.40.0270.03716.36
5.4.30.0230.07016.36
5.4.20.0330.07016.48
5.4.10.0230.07016.13
5.4.00.0200.03715.71
5.3.290.0270.03714.65
5.3.280.0130.04014.54
5.3.270.0200.03714.40
5.3.260.0200.05014.62
5.3.250.0170.03714.55
5.3.240.0100.05314.59
5.3.230.0200.04314.54
5.3.220.0200.07014.47
5.3.210.0130.04014.59
5.3.200.0200.04014.42
5.3.190.0170.03714.43
5.3.180.0200.03314.39
5.3.170.0200.04314.42
5.3.160.0270.04314.38
5.3.150.0170.03714.44
5.3.140.0200.03314.54
5.3.130.0230.04314.48
5.3.120.0300.06714.40
5.3.110.0170.03714.35
5.3.100.0170.06013.98
5.3.90.0170.03313.86
5.3.80.0170.05713.81
5.3.70.0170.04314.04

preferences:
45.8 ms | 401 KiB | 5 Q