3v4l.org

run code in 300+ PHP versions simultaneously
<?php $duration = 2; $start='01-01-2019'; $month =date('n', strtotime($start)); $year =date('Y', strtotime($start)); $mon = 12-$month+1; $remainingMonth = $duration*12; $years_arr = array("$year"); $residue_arr = array("$remainingMonth"); $years_arr = process($remainingMonth,$year,$mon,$years_arr,$residue_arr); print_r($years_arr); //<output function process($remainingMonth,$year,$mon,$years_arr,$residue_arr){ $residue = $remainingMonth - $mon;//$D$18-D20 if($residue != 0){ $new_year = $year+1; array_push($years_arr, $new_year); array_push($residue_arr, $residue); if($residue > 12 ){ $mon = 12; } else { $mon = $residue; } echo "<br>"; process($residue,$new_year,$mon,$years_arr,$residue_arr); } else { print_r($years_arr); return $years_arr; } }//end of process(..)

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.0070.00718.43
8.3.50.0140.00418.41
8.3.40.0120.00918.96
8.3.30.0100.00719.05
8.3.20.0080.00021.99
8.3.10.0030.00520.21
8.3.00.0080.00023.70
8.2.180.0030.01418.54
8.2.170.0210.00019.07
8.2.160.0110.00422.96
8.2.150.0000.00824.18
8.2.140.0030.00524.66
8.2.130.0040.00426.16
8.2.120.0040.00426.16
8.2.110.0060.00320.96
8.2.100.0070.00318.16
8.2.90.0040.00419.88
8.2.80.0000.00818.05
8.2.70.0040.00417.75
8.2.60.0000.00818.05
8.2.50.0000.00818.07
8.2.40.0040.00418.34
8.2.30.0050.00219.39
8.2.20.0040.00418.04
8.2.10.0040.00419.43
8.2.00.0070.00019.31
8.1.280.0140.00425.92
8.1.270.0040.00420.70
8.1.260.0050.00226.35
8.1.250.0030.00628.09
8.1.240.0090.00022.67
8.1.230.0070.00421.00
8.1.220.0050.00317.79
8.1.210.0000.00918.77
8.1.200.0070.00317.47
8.1.190.0050.00317.48
8.1.180.0000.00918.10
8.1.170.0040.00418.69
8.1.160.0050.00218.91
8.1.150.0040.00418.96
8.1.140.0090.00019.04
8.1.130.0000.00720.19
8.1.120.0070.00017.66
8.1.110.0040.00417.57
8.1.100.0040.00417.57
8.1.90.0040.00417.64
8.1.80.0000.00817.64
8.1.70.0040.00417.57
8.1.60.0030.00617.76
8.1.50.0030.00917.57
8.1.40.0000.00817.68
8.1.30.0050.00317.86
8.1.20.0060.00317.83
8.1.10.0040.00417.59
8.1.00.0040.00417.56
8.0.300.0060.00319.91
8.0.290.0000.00917.00
8.0.280.0000.00718.47
8.0.270.0030.00318.30
8.0.260.0030.00318.60
8.0.250.0030.00517.29
8.0.240.0040.00417.27
8.0.230.0070.00017.24
8.0.220.0000.00817.14
8.0.210.0070.00017.11
8.0.200.0070.00017.29
8.0.190.0080.00017.20
8.0.180.0000.00817.21
8.0.170.0040.00417.23
8.0.160.0080.00017.07
8.0.150.0060.00317.05
8.0.140.0060.00317.16
8.0.130.0030.00313.51
8.0.120.0040.00417.11
8.0.110.0000.00817.25
8.0.100.0000.00717.01
8.0.90.0090.00017.13
8.0.80.0070.00817.15
8.0.70.0030.00617.19
8.0.60.0020.00517.19
8.0.50.0000.00717.12
8.0.30.0190.00017.18
8.0.20.0080.01217.34
8.0.10.0050.00217.37
8.0.00.0100.00716.69
7.4.330.0020.00215.55
7.4.320.0000.00616.77
7.4.300.0060.00016.57
7.4.290.0080.00016.65
7.4.280.0090.00016.64
7.4.270.0050.00316.60
7.4.260.0030.00313.44
7.4.250.0000.00716.77
7.4.240.0030.00316.72
7.4.230.0000.00716.52
7.4.220.0030.00416.70
7.4.210.0080.00616.62
7.4.200.0030.00316.70
7.4.130.0130.00716.81
7.4.120.0120.00616.79
7.4.110.0100.00716.81
7.4.100.0130.01016.84
7.4.90.0030.01416.72
7.4.80.0090.00919.39
7.4.70.0040.01116.72
7.4.60.0130.00316.67
7.4.50.0100.00716.77
7.4.40.0120.00616.72
7.4.30.0080.01216.60
7.4.20.0100.01416.83
7.4.10.0130.00916.79
7.4.00.0030.01616.74
7.3.330.0070.00016.57
7.3.320.0060.00013.38
7.3.310.0000.00716.41
7.3.300.0030.00316.41
7.3.290.0120.00816.51
7.3.280.0180.00016.54
7.3.260.0110.00716.88
7.3.240.0080.00816.68
7.3.230.0030.01616.76
7.3.210.0130.00316.64
7.3.200.0090.00816.79
7.3.190.0150.00816.77
7.3.180.0060.00916.72
7.3.170.0070.00716.50
7.3.160.0150.00416.56
7.3.150.0150.00416.69
7.3.140.0100.01316.57
7.3.130.0080.01116.73
7.3.120.0170.00316.78
7.3.110.0150.00916.52
7.3.100.0030.01616.84
7.3.90.0070.01416.64
7.3.80.0090.01216.84
7.3.70.0100.01016.68
7.3.60.0040.01316.64
7.3.50.0140.00516.53
7.3.40.0190.00316.64
7.3.30.0090.01016.42
7.3.20.0140.00716.59
7.3.10.0080.01116.82
7.3.00.0130.00616.81
7.2.330.0090.00917.06
7.2.320.0100.01316.79
7.2.310.0130.00516.98
7.2.300.0060.01116.59
7.2.290.0090.01316.66
7.2.280.0030.02016.63
7.2.270.0090.00916.90
7.2.260.0090.00916.71
7.2.250.0170.00616.96
7.2.240.0090.00916.78
7.2.230.0090.00916.57
7.2.220.0150.00816.87
7.2.210.0140.00816.67
7.2.200.0100.01016.87
7.2.190.0090.01416.85
7.2.180.0030.02116.80
7.2.170.0110.00816.79
7.2.160.0100.01316.73
7.2.150.0100.01316.90
7.2.140.0110.01116.79
7.2.130.0050.01816.96
7.2.120.0160.00316.89
7.2.110.0120.00916.80
7.2.100.0160.00916.83
7.2.90.0090.01316.70
7.2.80.0330.01316.77
7.2.70.0100.01416.93
7.2.60.0100.01316.78
7.2.50.0110.00716.81
7.2.40.0140.01016.86
7.2.30.0060.01416.79
7.2.20.0000.02216.82
7.2.10.0150.00916.73
7.2.00.0090.00916.89

preferences:
67.49 ms | 401 KiB | 5 Q