3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyDateTime extends DateTime { public static function createFromFormat($dformat, $dvalue) { $schedule = $dvalue; $schedule_format = str_replace(array('Y','m','d', 'H', 'i','a'),array('%Y','%m','%d', '%I', '%M', '%p' ) ,$dformat); // %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, $schedule_format); $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'] ); $new_schedule = new DateTime($ymd); return $new_schedule; } } $dateTime = MyDateTime::createFromFormat('d/m/Y', '13/06/2013'); var_dump($dateTime); var_dump($dateTime->format('Y-m-d'));

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.0170.00318.39
8.3.50.0120.00922.84
8.3.40.0120.00318.50
8.3.30.0110.00619.09
8.3.20.0040.00420.16
8.3.10.0030.00621.90
8.3.00.0000.00817.93
8.2.180.0140.00718.41
8.2.170.0120.00922.96
8.2.160.0130.00320.39
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0070.01026.16
8.2.120.0040.00421.07
8.2.110.0090.00021.04
8.2.100.0040.00817.49
8.2.90.0080.00018.97
8.2.80.0040.00417.97
8.2.70.0050.00317.50
8.2.60.0070.00017.93
8.2.50.0000.00918.10
8.2.40.0040.00418.09
8.2.30.0000.00817.93
8.2.20.0000.00717.52
8.2.10.0000.00718.04
8.2.00.0030.00517.56
8.1.280.0060.01225.92
8.1.270.0090.00023.97
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0040.00423.98
8.1.230.0000.01017.70
8.1.220.0040.00417.74
8.1.210.0030.00518.77
8.1.200.0060.00317.25
8.1.190.0070.00317.23
8.1.180.0050.00318.10
8.1.170.0040.00418.26
8.1.160.0080.00021.89
8.1.150.0070.00018.63
8.1.140.0030.00517.33
8.1.130.0000.00917.72
8.1.120.0070.00017.34
8.1.110.0080.00017.34
8.1.100.0000.00717.38
8.1.90.0000.00817.33
8.1.80.0080.00017.38
8.1.70.0030.00317.30
8.1.60.0060.00317.35
8.1.50.0000.00817.26
8.1.40.0040.00417.44
8.1.30.0030.00517.50
8.1.20.0040.00417.59
8.1.10.0040.00417.38
8.1.00.0040.00417.21
8.0.300.0000.00818.77
8.0.290.0060.00316.63
8.0.280.0000.00818.32
8.0.270.0000.00717.13
8.0.260.0030.00317.01
8.0.250.0000.00616.77
8.0.240.0080.00016.89
8.0.230.0060.00316.77
8.0.220.0040.00416.83
8.0.210.0000.00716.72
8.0.200.0000.00616.88
8.0.190.0000.00816.80
8.0.180.0030.00516.76
8.0.170.0070.00016.85
8.0.160.0000.00716.79
8.0.150.0080.00016.73
8.0.140.0070.00316.66
8.0.130.0030.00313.27
8.0.120.0000.00816.75
8.0.110.0000.00716.83
8.0.100.0040.00416.70
8.0.90.0030.00316.85
8.0.80.0130.00316.80
8.0.70.0050.00316.70
8.0.60.0030.00616.79
8.0.50.0050.00316.79
8.0.30.0160.00616.92
8.0.20.0100.01117.40
8.0.10.0030.00516.83
8.0.00.0100.00716.68
7.4.330.0050.00015.00
7.4.320.0000.00616.58
7.4.300.0030.00316.66
7.4.290.0030.00616.62
7.4.280.0030.00316.66
7.4.270.0070.00016.51
7.4.260.0040.00416.74
7.4.250.0050.00216.56
7.4.240.0040.00416.67
7.4.230.0000.00716.63
7.4.220.0110.01416.59
7.4.210.0090.00616.78
7.4.200.0040.00416.54
7.4.160.0140.00716.63
7.4.150.0090.00917.40
7.4.140.0080.01017.86
7.4.130.0130.00716.76
7.4.120.0150.00516.74
7.4.110.0070.01016.57
7.4.100.0130.00616.72
7.4.90.0140.00516.70
7.4.80.0120.00819.39
7.4.70.0090.01016.84
7.4.60.0100.00716.70
7.4.50.0040.00016.80
7.4.40.0100.01016.79
7.4.30.0110.00616.52
7.4.00.0100.00714.90
7.3.330.0050.00213.43
7.3.320.0030.00313.52
7.3.310.0000.00716.62
7.3.300.0000.00816.42
7.3.290.0030.01016.51
7.3.280.0070.00816.54
7.3.270.0080.00917.40
7.3.260.0060.01416.57
7.3.250.0080.00916.83
7.3.240.0060.01416.61
7.3.230.0100.00616.53
7.3.210.0090.00916.49
7.3.200.0040.01719.39
7.3.190.0090.01316.81
7.3.180.0100.00716.57
7.3.170.0130.00316.64
7.3.160.0060.01016.57
7.3.120.0100.00315.11
7.3.10.0130.00016.51
7.3.00.0080.00416.44
7.2.330.0090.01516.50
7.2.320.0100.00716.57
7.2.310.0040.01416.68
7.2.300.0070.01116.78
7.2.290.0100.01116.62
7.2.130.0120.00616.75
7.2.120.0090.00416.62
7.2.110.0130.00016.80
7.2.100.0170.00316.37
7.2.90.0040.00916.52
7.2.80.0060.01016.67
7.2.70.0110.00716.64
7.2.60.0080.00616.81
7.2.50.0100.00316.80
7.2.40.0120.00316.93
7.2.30.0130.00316.81
7.2.20.0100.01016.55
7.2.10.0040.01516.72
7.2.00.0060.01118.08
7.1.250.0080.00615.61
7.1.200.0040.00715.99
7.1.100.0150.01516.55
7.1.70.0040.00417.11
7.1.60.0100.01419.40
7.1.50.0070.01116.96
7.1.00.0070.07022.24
7.0.200.0030.00716.73
7.0.140.0070.06721.92
7.0.60.0100.05719.79
7.0.50.0030.05017.88
7.0.40.0070.08020.16
7.0.30.0270.08720.17
7.0.20.0330.05720.23
7.0.10.0070.08720.09
7.0.00.0030.04020.24
5.6.280.0000.07021.14
5.6.210.0070.06020.49
5.6.200.0030.07718.27
5.6.190.0070.09020.50
5.6.180.0230.08720.54
5.6.170.0270.03720.44
5.6.160.0030.04020.54
5.6.150.0030.08718.18
5.6.140.0000.05718.16
5.6.130.0100.07718.19
5.6.120.0070.04321.05
5.6.110.0070.06020.99
5.6.100.0030.08721.01
5.6.90.0200.07320.99
5.6.80.0100.03320.45
5.5.350.4300.04720.43
5.5.340.0170.07318.04
5.5.330.0070.04720.35
5.5.320.0300.04020.32
5.5.310.0400.04720.27
5.5.300.0030.06318.08
5.5.290.0170.07018.04
5.5.280.0070.08320.78
5.5.270.0170.07720.97
5.5.260.0130.05320.63
5.5.250.0100.07020.81
5.5.240.0200.07720.38
5.4.450.0300.04019.50
5.4.440.0300.05319.48
5.4.430.0370.03319.40
5.4.420.0230.04319.39
5.4.410.0270.04319.36
5.4.400.0430.04719.14
5.4.390.0500.04019.15
5.4.380.0270.05718.51
5.4.370.0630.05718.84
5.4.360.0330.04718.45
5.4.350.0370.05318.80
5.4.340.0270.05018.59
5.4.320.0070.04112.53
5.4.310.0050.03912.53
5.4.300.0070.03612.53
5.4.290.0080.03612.53
5.4.280.0040.03612.42
5.4.270.0050.04212.43
5.4.260.0050.03812.42
5.4.250.0060.04012.43
5.4.240.0090.03412.43
5.4.230.0070.04012.41
5.4.220.0030.03912.42
5.4.210.0090.03512.41
5.4.200.0060.03812.42
5.4.190.0060.03912.41
5.4.180.0050.03712.41
5.4.170.0080.03612.42
5.4.160.0070.03812.41
5.4.150.0060.04912.41
5.4.140.0120.03612.10
5.4.130.0090.03712.08
5.4.120.0040.04512.04
5.4.110.0090.03212.04
5.4.100.0030.03812.04
5.4.90.0030.03912.04
5.4.80.0080.03412.04
5.4.70.0030.03712.04
5.4.60.0060.03412.04
5.4.50.0060.03612.04
5.4.40.0060.03412.02
5.4.30.0080.03212.02
5.4.20.0070.03312.02
5.4.10.0060.03412.02
5.4.00.0030.03911.51
5.3.290.0100.03912.80
5.3.280.0070.04012.71
5.3.270.0060.03912.73
5.3.260.0080.03712.72
5.3.250.0060.03712.71
5.3.240.0050.03812.71
5.3.230.0050.03812.71
5.3.220.0050.03812.68
5.3.210.0070.04212.68
5.3.200.0070.03512.68
5.3.190.0060.03612.68
5.3.180.0050.03612.68
5.3.170.0040.03812.67
5.3.160.0050.03612.67
5.3.150.0030.03912.68
5.3.140.0030.03912.67
5.3.130.0040.04012.66
5.3.120.0060.03812.66
5.3.110.0060.03812.66
5.3.100.0030.03912.14
5.3.90.0060.03612.12
5.3.80.0030.03912.11
5.3.70.0050.03612.11
5.3.60.0070.03512.10
5.3.50.0040.03712.05
5.3.40.0070.03412.05
5.3.30.0040.03712.01
5.3.20.0050.03611.79
5.3.10.0040.03611.75
5.3.00.0040.03911.74
5.2.170.0050.0299.25
5.2.160.0050.0279.24
5.2.150.0020.0359.25
5.2.140.0070.0299.24
5.2.130.0020.0349.20
5.2.120.0050.0299.20
5.2.110.0050.0319.20
5.2.100.0030.0299.20
5.2.90.0050.0289.20
5.2.80.0020.0329.19
5.2.70.0030.0319.19
5.2.60.0050.0299.14
5.2.50.0050.0299.11
5.2.40.0040.0299.09
5.2.30.0050.0309.07
5.2.20.0020.0309.05
5.2.10.0010.0308.96
5.2.00.0030.0308.82
5.1.60.0060.0228.09
5.1.50.0030.0258.09
5.1.40.0030.0258.07
5.1.30.0040.0278.42
5.1.20.0050.0268.44
5.1.10.0050.0288.17
5.1.00.0040.0278.17
5.0.50.0030.0216.66
5.0.40.0050.0186.52
5.0.30.0040.0346.33
5.0.20.0080.0196.29
5.0.10.0070.0176.27
5.0.00.0040.0306.27
4.4.90.0020.0164.78
4.4.80.0030.0154.75
4.4.70.0050.0144.76
4.4.60.0040.0144.75
4.4.50.0030.0154.77
4.4.40.0020.0274.70
4.4.30.0020.0164.76
4.4.20.0020.0174.84
4.4.10.0020.0174.85
4.4.00.0010.0274.76
4.3.110.0040.0154.67
4.3.100.0050.0134.66
4.3.90.0030.0194.64
4.3.80.0030.0284.59
4.3.70.0020.0154.63
4.3.60.0040.0134.62
4.3.50.0030.0164.63
4.3.40.0030.0244.54
4.3.30.0010.0183.30
4.3.20.0020.0223.28
4.3.10.0010.0173.24
4.3.00.0100.01715.17

preferences:
49.09 ms | 401 KiB | 5 Q