3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getAvailableSubscriptionEndYears() { $currentYear = intval(date_create()->format('Y')); $availableYears = array($currentYear => $currentYear); for($i=1;$i<10;$i++) { $nextYear = $currentYear+1; $availableYears[$nextYear] = $nextYear; } return $availableYears; } var_dump(getAvailableSubscriptionEndYears()); ?>

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.0130.01018.68
8.3.50.0140.00721.17
8.3.40.0090.00618.68
8.3.30.0210.00018.69
8.3.20.0070.00020.13
8.3.10.0020.00523.66
8.3.00.0080.00019.66
8.2.180.0210.00316.61
8.2.170.0080.00822.96
8.2.160.0130.00320.47
8.2.150.0100.00024.18
8.2.140.0140.00424.66
8.2.130.0070.00026.16
8.2.120.0000.00917.75
8.2.110.0150.00322.38
8.2.100.0100.00317.97
8.2.90.0040.00417.75
8.2.80.0080.00018.91
8.2.70.0000.00817.63
8.2.60.0040.00417.75
8.2.50.0040.00717.75
8.2.40.0040.00421.14
8.2.30.0000.00719.91
8.2.20.0040.00417.77
8.2.10.0030.00518.20
8.2.00.0050.00317.99
8.1.280.0120.00925.92
8.1.270.0050.00320.38
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0090.00023.77
8.1.230.0040.00820.97
8.1.220.0080.00017.76
8.1.210.0030.00518.77
8.1.200.0060.00317.48
8.1.190.0040.00417.48
8.1.180.0080.00018.10
8.1.170.0040.00418.75
8.1.160.0060.00321.95
8.1.150.0080.00018.95
8.1.140.0040.00417.56
8.1.130.0000.00717.70
8.1.120.0000.00717.50
8.1.110.0000.00817.48
8.1.100.0030.00317.56
8.1.90.0050.00217.68
8.1.80.0020.00517.60
8.1.70.0040.00417.65
8.1.60.0000.00917.68
8.1.50.0040.00417.70
8.1.40.0040.00417.65
8.1.30.0060.00317.64
8.1.20.0040.00417.77
8.1.10.0000.00817.61
8.1.00.0060.00317.54
8.0.300.0040.00418.77
8.0.290.0040.00416.88
8.0.280.0000.01118.45
8.0.270.0030.00516.96
8.0.260.0030.00317.24
8.0.250.0030.00317.13
8.0.240.0030.00617.08
8.0.230.0070.00017.12
8.0.220.0000.00717.05
8.0.210.0000.00716.94
8.0.200.0000.00617.09
8.0.190.0070.00316.97
8.0.180.0000.00717.08
8.0.170.0060.00317.07
8.0.160.0070.00017.11
8.0.150.0000.00816.81
8.0.140.0000.00816.88
8.0.130.0060.00013.45
8.0.120.0050.00317.02
8.0.110.0000.00817.09
8.0.100.0000.00717.02
8.0.90.0050.00316.89
8.0.80.0140.00717.04
8.0.70.0030.00317.03
8.0.60.0030.00517.02
8.0.50.0070.00017.03
8.0.30.0130.00317.32
8.0.20.0130.00617.40
8.0.10.0040.00417.17
8.0.00.0070.01317.01
7.4.330.0000.00615.08
7.4.320.0030.00316.66
7.4.300.0000.00716.75
7.4.290.0040.00416.54
7.4.280.0050.00216.58
7.4.270.0030.00316.64
7.4.260.0000.00716.65
7.4.250.0060.00316.51
7.4.240.0040.00416.66
7.4.230.0030.00316.48
7.4.220.0060.01516.58
7.4.210.0070.00916.70
7.4.200.0000.00716.81
7.4.160.0080.00816.67
7.4.150.0060.01417.40
7.4.140.0090.01217.86
7.4.130.0070.01116.64
7.4.120.0100.00916.48
7.4.110.0150.00416.72
7.4.100.0140.00316.62
7.4.90.0130.00416.62
7.4.80.0050.01919.39
7.4.70.0150.00616.68
7.4.60.0030.01416.54
7.4.50.0000.00916.80
7.4.40.0040.01216.72
7.4.30.0130.00316.46
7.4.00.0030.01415.02
7.3.330.0030.00313.52
7.3.320.0000.00613.50
7.3.310.0050.00316.54
7.3.300.0000.00716.45
7.3.290.0040.00416.52
7.3.280.0080.01016.50
7.3.270.0060.01117.40
7.3.260.0070.01016.70
7.3.240.0040.01216.57
7.3.230.0100.00616.56
7.3.210.0100.00716.48
7.3.200.0100.00716.85
7.3.190.0150.00416.68
7.3.180.0130.00416.68
7.3.170.0090.01216.84
7.3.160.0120.00616.51
7.2.330.0090.00916.91
7.2.320.0100.00716.79
7.2.310.0100.01016.86
7.2.300.0060.01616.59
7.2.290.0040.01417.03
7.2.60.0130.00016.68
7.2.00.0090.00619.63
7.1.200.0000.00916.06
7.1.100.0060.01218.37
7.1.70.0140.00317.11
7.1.60.0070.01819.17
7.1.50.0270.00735.09
7.1.00.0030.07322.43
7.0.200.0000.00816.65
7.0.60.0070.07320.00
7.0.50.0100.04717.89
7.0.40.0030.05720.25
7.0.30.0330.07720.30
7.0.20.0070.05020.06
7.0.10.0100.08020.15
7.0.00.0100.04020.21
5.6.280.0100.05021.11
5.6.210.0170.06720.73
5.6.200.0130.07718.19
5.6.190.0070.04720.41
5.6.180.0270.06320.48
5.6.170.0070.05020.54
5.6.160.0070.04320.45
5.6.150.0130.07318.23
5.6.140.0000.05318.13
5.6.130.0100.08318.18
5.6.120.0070.04021.12
5.6.110.0070.07320.96
5.6.100.0200.08020.99
5.6.90.0230.06721.12
5.6.80.0000.05020.39
5.6.70.0300.06720.42
5.5.350.0370.06720.41
5.5.340.0030.05017.98
5.5.330.0100.08020.40
5.5.320.0000.04720.24
5.5.310.0330.07020.24
5.5.300.0030.05317.98
5.5.290.0000.06017.96
5.5.280.0130.08320.96
5.5.270.0030.04720.88
5.5.260.0030.04020.86
5.5.250.0030.07320.59
5.5.240.0230.07020.35
5.4.450.1100.05319.48
5.4.440.1030.05019.58
5.4.430.0970.05319.63
5.4.420.0900.05319.55
5.4.410.0900.05319.42
5.4.400.0930.04719.23
5.4.390.0900.05319.14
5.4.380.0800.04719.38
5.4.370.0830.06319.29
5.4.360.0830.05319.26
5.4.350.0800.06319.11
5.4.340.0970.05019.01
5.4.320.0800.05719.23
5.4.310.0900.04719.06
5.4.300.0830.05719.15
5.4.290.1130.06719.20
5.4.280.0970.05019.01
5.4.270.0800.04319.05
5.4.260.0770.04319.12
5.4.250.0600.06319.22
5.4.240.0900.04319.05
5.4.230.0970.05718.86
5.4.220.1100.05719.07
5.4.210.0700.06319.14
5.4.200.0970.04319.30
5.4.190.0730.05018.83
5.4.180.0730.05719.39
5.4.170.0700.05319.29
5.4.160.0830.04318.96
5.4.150.0730.05719.25
5.4.140.0700.05316.49
5.4.130.0700.05016.49
5.4.120.0870.05016.59
5.4.110.0630.05716.67
5.4.100.0730.04316.46
5.4.90.0700.05716.57
5.4.80.0930.06016.48
5.4.70.0370.04716.44
5.4.60.0300.05016.40
5.4.50.0070.04316.42
5.4.40.0030.07316.25
5.4.30.0100.05716.22
5.4.20.0070.03316.42

preferences:
58.89 ms | 401 KiB | 5 Q