3v4l.org

run code in 300+ PHP versions simultaneously
<?php $k = 201435; $str = strval($k); $year = intval(substr($str,0,4)); $month = intval(substr($str,4)); while($month>12){ $month = $month-12; $year++; } $formatted = intval(strval($year).str_pad(strval($month), 2, "0", STR_PAD_LEFT)); var_dump($month, $year, $formatted);

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.00318.43
8.3.60.0120.00916.50
8.3.50.0270.00922.12
8.3.40.0040.01118.54
8.3.30.0070.00718.96
8.3.20.0050.00220.30
8.3.10.0040.00421.94
8.3.00.0090.00019.13
8.2.180.0110.00718.01
8.2.170.0160.00319.00
8.2.160.0140.00022.96
8.2.150.0070.00025.66
8.2.140.0040.00424.66
8.2.130.0030.01126.16
8.2.120.0090.00020.61
8.2.110.0030.00719.27
8.2.100.0040.00817.63
8.2.90.0040.00419.22
8.2.80.0000.00817.97
8.2.70.0000.00817.50
8.2.60.0050.00317.80
8.2.50.0030.00618.07
8.2.40.0080.00318.20
8.2.30.0000.00817.93
8.2.20.0000.00717.50
8.2.10.0040.00418.03
8.2.00.0060.00318.05
8.1.280.0070.01125.92
8.1.270.0130.00420.25
8.1.260.0000.00726.35
8.1.250.0080.00028.09
8.1.240.0060.00323.92
8.1.230.0030.00917.65
8.1.220.0080.00017.74
8.1.210.0070.00318.77
8.1.200.0080.00317.25
8.1.190.0000.00817.13
8.1.180.0080.00018.10
8.1.170.0040.00418.54
8.1.160.0040.00422.04
8.1.150.0030.00518.89
8.1.140.0040.00417.43
8.1.130.0030.00317.70
8.1.120.0030.00517.43
8.1.110.0040.00417.39
8.1.100.0030.00517.48
8.1.90.0000.00717.43
8.1.80.0070.00017.44
8.1.70.0030.00317.46
8.1.60.0040.00417.55
8.1.50.0040.00417.47
8.1.40.0030.00617.42
8.1.30.0040.00417.64
8.1.20.0070.00017.67
8.1.10.0080.00017.35
8.1.00.0050.00217.23
8.0.300.0070.00018.77
8.0.290.0040.00416.75
8.0.280.0030.00318.35
8.0.270.0030.00317.13
8.0.260.0000.00717.32
8.0.250.0030.00316.92
8.0.240.0030.00517.00
8.0.230.0030.00316.93
8.0.220.0030.00316.79
8.0.210.0000.00716.79
8.0.200.0060.00016.95
8.0.190.0050.00216.84
8.0.180.0040.00416.91
8.0.170.0000.00816.81
8.0.160.0030.00416.88
8.0.150.0000.00716.87
8.0.140.0040.00416.74
8.0.130.0030.00313.39
8.0.120.0000.00716.90
8.0.110.0000.00716.94
8.0.100.0040.00416.80
8.0.90.0040.00416.70
8.0.80.0140.00716.83
8.0.70.0000.00816.86
8.0.60.0000.00716.96
8.0.50.0050.00316.74
8.0.30.0070.01216.93
8.0.20.0060.01417.40
8.0.10.0050.00216.90
8.0.00.0090.00916.77
7.4.330.0050.00015.16
7.4.320.0030.00316.58
7.4.300.0000.00716.62
7.4.290.0000.00616.49
7.4.280.0040.00416.59
7.4.270.0030.00316.46
7.4.260.0030.00316.60
7.4.250.0050.00216.55
7.4.240.0030.00316.49
7.4.230.0070.00016.71
7.4.220.0090.00916.71
7.4.210.0090.00916.64
7.4.200.0050.00216.64
7.4.160.0060.00916.42
7.4.150.0090.01517.40
7.4.140.0110.00717.86
7.4.130.0140.00816.49
7.4.120.0050.01316.52
7.4.110.0060.01216.52
7.4.100.0130.00916.66
7.4.90.0140.00316.36
7.4.80.0130.00319.39
7.4.70.0130.01016.47
7.4.60.0110.00416.33
7.4.50.0050.00316.25
7.4.40.0120.00616.59
7.4.30.0090.00816.49
7.4.00.0090.00615.06
7.3.330.0000.00613.00
7.3.320.0060.00013.24
7.3.310.0070.00016.40
7.3.300.0040.00416.26
7.3.290.0120.00416.27
7.3.280.0060.01116.22
7.3.270.0150.00317.40
7.3.260.0100.00616.38
7.3.250.0120.00616.41
7.3.240.0130.00616.21
7.3.230.0150.00616.47
7.3.210.0060.01016.48
7.3.200.0160.00619.39
7.3.190.0030.01416.23
7.3.180.0120.00916.55
7.3.170.0080.01116.51
7.3.160.0100.00716.58
7.2.330.0150.00316.74
7.2.320.0120.00916.58
7.2.310.0070.01016.78
7.2.300.0070.01016.29
7.2.290.0100.00616.61
7.2.00.0040.01519.46
7.1.100.0220.00316.33
7.1.70.0000.00717.29
7.1.60.0100.01019.59
7.1.50.0040.01616.96
7.1.00.0000.08022.44
7.0.200.0070.00016.79
7.0.60.0100.07019.99
7.0.50.0130.07317.66
7.0.40.0030.07020.09
7.0.30.0630.07020.33
7.0.20.0200.08720.13
7.0.10.0270.08320.13
7.0.00.0070.05320.09
5.6.280.0100.06721.11
5.6.210.0000.08720.56
5.6.200.0030.08018.12
5.6.190.0070.04020.56
5.6.180.3370.05020.49
5.6.170.0200.03720.46
5.6.160.0100.06020.50
5.6.150.0030.04318.12
5.6.140.0000.04018.16
5.6.130.0130.07018.18
5.6.120.0070.05021.05
5.6.110.0070.08021.13
5.6.100.0030.07020.95
5.6.90.0030.04020.99
5.6.80.0070.08020.37
5.6.70.0800.03720.39
5.5.350.0130.08720.33
5.5.340.0100.07717.88
5.5.330.0030.07720.57
5.5.320.0400.07020.24
5.5.310.0270.07320.30
5.5.300.0130.03017.88
5.5.290.0000.04318.02
5.5.280.0100.08020.96
5.5.270.0030.09020.75
5.5.260.0100.08020.88
5.5.250.0030.07020.61
5.5.240.0070.03720.10
5.4.450.0770.06719.60
5.4.440.0630.04719.34
5.4.430.0230.05019.32
5.4.420.0170.06319.42
5.4.410.0170.05719.30
5.4.400.0270.04319.18
5.4.390.0230.05718.73
5.4.380.0430.05019.25
5.4.370.0230.05018.84
5.4.360.0200.05319.11
5.4.350.0200.06018.84
5.4.340.0300.06019.05
5.4.320.0230.05719.01
5.4.310.0300.04019.18
5.4.300.0300.04719.20
5.4.290.0170.06718.77
5.4.280.0130.07318.74
5.4.270.0170.04718.83
5.4.260.0130.05018.74
5.4.250.0170.05019.08
5.4.240.0100.06018.83
5.4.230.0230.04319.11
5.4.220.0170.05019.25
5.4.210.0170.05019.13
5.4.200.0100.05716.75
5.4.190.0230.04018.91
5.4.180.0170.04719.07
5.4.170.0200.05018.91
5.4.160.0170.05319.09
5.4.150.0130.05318.93
5.4.140.0070.05716.19
5.4.130.0170.04716.38
5.4.120.0100.05016.50
5.4.110.0330.05016.22
5.4.100.0130.05016.52
5.4.90.0100.05316.51
5.4.80.0170.04716.17
5.4.70.0300.03716.51
5.4.60.0100.05016.18
5.4.50.0170.04316.51
5.4.40.0100.05316.19
5.4.30.0070.05316.14
5.4.20.0200.04316.15
5.4.10.0130.05016.49
5.4.00.0130.04715.83
5.3.290.0170.05314.52
5.3.280.0130.05714.49
5.3.270.0230.06314.53
5.3.260.0270.04714.61
5.3.250.0070.06014.49
5.3.240.0170.05714.42
5.3.230.0170.05014.42
5.3.220.0170.04714.47
5.3.210.0100.06014.36
5.3.200.0130.05714.35
5.3.190.0200.04714.46
5.3.180.0130.05314.50
5.3.170.0200.04714.41
5.3.160.0170.05014.45
5.3.150.0100.05714.50
5.3.140.0130.05314.42
5.3.130.0130.05714.39
5.3.120.0170.05014.39
5.3.110.0200.05014.34
5.3.100.0200.04714.04
5.3.90.0200.06313.88
5.3.80.0170.04713.86
5.3.70.0100.05314.04
5.3.60.0130.04713.87
5.3.50.0170.04313.79
5.3.40.0170.04313.79
5.3.30.0270.06013.92
5.3.20.0330.05013.61
5.3.10.0070.05313.52
5.3.00.0230.03713.65
5.2.170.0100.04011.18
5.2.160.0130.03711.06
5.2.150.0170.04711.01
5.2.140.0330.03710.96
5.2.130.0170.03711.19
5.2.120.0170.03311.04
5.2.110.0100.04310.89
5.2.100.0070.04310.94
5.2.90.0200.03011.14
5.2.80.0170.03711.03
5.2.70.0130.04310.98
5.2.60.0130.04011.13
5.2.50.0070.04710.95
5.2.40.0070.04310.93
5.2.30.0030.04710.96
5.2.20.0070.04310.89
5.2.10.0170.03310.92
5.2.00.0100.04010.65
5.1.60.0100.0339.90
5.1.50.0100.0339.86
5.1.40.0170.0279.89
5.1.30.0130.03010.40
5.1.20.0100.03310.29
5.1.10.0200.02310.06
5.1.00.0100.03310.06
5.0.50.0030.0338.39
5.0.40.0030.0308.33
5.0.30.0100.0378.27
5.0.20.0100.0238.27
5.0.10.0070.0278.09
5.0.00.0070.0408.30
4.4.90.0030.0235.78
4.4.80.0100.0175.80
4.4.70.0000.0275.76
4.4.60.0070.0205.80
4.4.50.0030.0235.75
4.4.40.0070.0335.81
4.4.30.0030.0235.80
4.4.20.0030.0235.82
4.4.10.0000.0235.96
4.4.00.0000.0375.77
4.3.110.0000.0275.80
4.3.100.0030.0205.78
4.3.90.0000.0235.64
4.3.80.0070.0305.83
4.3.70.0370.0175.72
4.3.60.0300.0175.75
4.3.50.0270.0205.66
4.3.40.0270.0335.75
4.3.30.0130.0204.52
4.3.20.0170.0204.57
4.3.10.0100.0274.39
4.3.00.0030.01315.54

preferences:
65.32 ms | 401 KiB | 5 Q