3v4l.org

run code in 300+ PHP versions simultaneously
<?php function odd($limit){ $row=1; $current_number=1; while($current_number<=$limit){ for($i=1;$i<=$row;$i++){ echo $current_number." "; $current_number=$current_number+2;//incrementing numbers by 2 if you want to increment by 1 i.e print all numbers replace 2 by 1 } $row++; echo "<br/>\n";//for new line } } odd(20); ?>

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.0130.00821.02
8.3.40.0070.00718.47
8.3.30.0110.00320.21
8.3.20.0080.00020.19
8.3.10.0040.00422.09
8.3.00.0040.00422.50
8.2.180.0120.00616.50
8.2.170.0180.00322.96
8.2.160.0100.01022.08
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0050.00520.39
8.2.110.0060.00322.24
8.2.100.0100.00517.91
8.2.90.0040.00419.05
8.2.80.0080.00019.27
8.2.70.0060.00617.50
8.2.60.0040.00418.05
8.2.50.0000.00818.07
8.2.40.0050.00319.88
8.2.30.0000.00719.44
8.2.20.0050.00217.58
8.2.10.0040.00417.66
8.2.00.0040.00417.75
8.1.280.0070.00725.92
8.1.270.0030.00623.99
8.1.260.0050.00226.35
8.1.250.0080.00028.09
8.1.240.0030.00623.75
8.1.230.0070.00420.85
8.1.220.0040.00417.74
8.1.210.0000.00918.77
8.1.200.0090.00017.36
8.1.190.0000.00817.30
8.1.180.0040.00418.10
8.1.170.0050.00318.54
8.1.160.0000.00718.89
8.1.150.0000.00718.59
8.1.140.0000.00817.42
8.1.130.0070.00017.79
8.1.120.0040.00417.47
8.1.110.0040.00417.36
8.1.100.0070.00017.38
8.1.90.0000.00717.40
8.1.80.0030.00417.29
8.1.70.0030.00317.28
8.1.60.0050.00317.63
8.1.50.0050.00217.49
8.1.40.0000.00817.56
8.1.30.0080.00017.68
8.1.20.0000.00817.49
8.1.10.0030.00517.41
8.1.00.0030.00517.47
8.0.300.0000.00718.77
8.0.290.0040.00417.05
8.0.280.0060.00018.35
8.0.270.0000.00717.17
8.0.260.0030.00316.81
8.0.250.0060.00316.84
8.0.240.0000.00816.88
8.0.230.0000.00716.94
8.0.220.0030.00316.90
8.0.210.0040.00416.85
8.0.200.0000.00717.00
8.0.190.0030.00316.86
8.0.180.0070.00016.95
8.0.170.0040.00416.91
8.0.160.0040.00416.81
8.0.150.0040.00416.73
8.0.140.0090.00016.74
8.0.130.0030.00313.38
8.0.120.0080.00016.72
8.0.110.0040.00416.93
8.0.100.0000.00716.94
8.0.90.0000.00816.92
8.0.80.0060.01316.85
8.0.70.0040.00416.86
8.0.60.0000.00716.93
8.0.50.0070.00016.93
8.0.30.0140.00516.94
8.0.20.0160.00817.40
8.0.10.0000.00816.81
8.0.00.0070.01116.87
7.4.330.0000.00515.00
7.4.320.0000.00616.49
7.4.300.0030.00316.49
7.4.290.0060.00016.43
7.4.280.0030.00316.61
7.4.270.0040.00416.41
7.4.260.0060.00013.19
7.4.250.0000.00716.50
7.4.240.0060.00316.61
7.4.230.0000.00716.50
7.4.220.0070.01016.47
7.4.210.0130.00416.56
7.4.200.0070.00016.70
7.4.190.0000.00716.43
7.4.160.0080.00816.53
7.4.150.0070.01017.40
7.4.140.0090.01117.86
7.4.130.0120.00916.49
7.4.120.0060.01116.55
7.4.110.0180.00416.33
7.4.100.0100.01016.40
7.4.90.0060.01516.55
7.4.80.0110.00619.39
7.4.70.0060.01016.54
7.4.60.0110.00516.39
7.4.50.0000.00616.54
7.4.40.0070.01122.77
7.4.30.0130.00716.64
7.4.00.0020.01214.82
7.3.330.0050.00013.23
7.3.320.0030.00313.25
7.3.310.0050.00216.20
7.3.300.0030.00316.18
7.3.290.0070.00716.31
7.3.280.0120.00516.30
7.3.270.0120.00917.40
7.3.260.0120.00616.47
7.3.250.0110.00816.64
7.3.240.0030.01416.41
7.3.230.0140.00316.44
7.3.210.0090.00916.51
7.3.200.0090.00919.39
7.3.190.0070.01116.30
7.3.180.0000.01516.58
7.3.170.0040.01116.39
7.3.160.0130.00316.45
7.3.120.0080.00715.00
7.3.110.0080.00814.60
7.3.100.0030.01414.95
7.3.90.0100.00714.63
7.3.80.0090.00014.50
7.3.70.0060.01314.94
7.3.60.0000.01514.89
7.3.50.0040.01114.85
7.3.40.0070.01114.82
7.3.30.0090.00914.80
7.3.20.0000.00916.78
7.3.10.0130.00316.68
7.3.00.0070.01016.65
7.2.330.0130.01016.70
7.2.320.0100.00716.69
7.2.310.0090.00916.73
7.2.300.0040.01216.66
7.2.290.0060.01016.62
7.2.250.0070.01115.25
7.2.240.0070.01315.10
7.2.230.0090.00914.74
7.2.220.0090.00914.96
7.2.210.0100.00614.95
7.2.200.0030.00914.78
7.2.190.0040.01114.77
7.2.180.0110.00815.05
7.2.170.0100.01015.07
7.2.00.0070.01019.44
7.1.330.0060.00815.93
7.1.320.0030.01015.50
7.1.310.0040.00715.66
7.1.300.0030.00715.61
7.1.290.0030.01015.94
7.1.280.0000.00915.46
7.1.270.0040.00715.57
7.1.260.0030.00615.49
7.1.100.0170.00318.00
7.1.70.0030.00916.96
7.1.60.0070.01519.32
7.1.50.0030.01016.56
7.1.00.0070.06322.30
7.0.200.0040.00416.54
7.0.140.0000.07322.08
7.0.80.0530.08719.99
7.0.70.0430.04719.99
7.0.60.0570.08320.02
7.0.50.0530.06320.31
7.0.40.0030.06020.10
7.0.30.0030.07720.05
7.0.20.0130.08319.92
7.0.10.0200.07019.95
7.0.00.0070.08720.10
5.6.280.0100.06720.82
5.6.230.0100.08020.68
5.6.220.0100.08020.62
5.6.210.0130.08020.76
5.6.200.0130.08021.01
5.6.190.0100.07721.18
5.6.180.0070.04721.04
5.6.170.0100.08020.96
5.6.160.0100.07021.06
5.6.150.0130.08020.99
5.6.140.0170.06721.06
5.6.130.0030.04721.02
5.6.120.0100.04320.93
5.6.110.0030.09021.05
5.6.100.0030.05021.16
5.6.90.0000.05321.01
5.6.80.0070.03720.41
5.6.70.0070.04020.38
5.6.60.0070.03720.51
5.6.50.0070.03720.41
5.6.40.0070.03720.32
5.6.30.0100.03320.48
5.6.20.0130.03020.38
5.6.10.0070.03720.52
5.6.00.0070.03720.45
5.5.370.0000.08020.36
5.5.360.0130.08020.35
5.5.350.0070.05320.47
5.5.340.0070.07720.90
5.5.330.0030.05020.86
5.5.320.0100.08020.92
5.5.310.0270.06720.64
5.5.300.0070.08020.77
5.5.290.0100.04720.84
5.5.280.0070.04020.83
5.5.270.0070.08320.79
5.5.260.0100.06020.85
5.5.250.0070.04320.65
5.5.240.0070.03720.03
5.5.230.0070.03720.15
5.5.220.0070.05020.29
5.5.210.0100.03320.17
5.5.200.0030.05020.23
5.5.190.0070.04720.14
5.5.180.0000.04320.21
5.5.160.0030.04020.18
5.5.150.0130.06720.27
5.5.140.0070.04320.26
5.5.130.0130.03320.24
5.5.120.0000.06320.23
5.5.110.0030.04020.23
5.5.100.0100.04320.17
5.5.90.0070.03720.15
5.5.80.0100.03320.16
5.5.70.0030.04019.96
5.5.60.0070.05320.16
5.5.50.0000.03720.11
5.5.40.0000.04320.15
5.5.30.0170.02020.10
5.5.20.0000.04320.04
5.5.10.0030.03720.11
5.5.00.0030.04020.09
5.4.450.0070.04719.42
5.4.440.0000.08719.49
5.4.430.0070.07019.45
5.4.420.0070.03719.27
5.4.410.0130.03719.04
5.4.400.0070.03719.04
5.4.390.0070.03318.95
5.4.380.0000.04019.20
5.4.370.0070.03319.04
5.4.360.0000.04318.87
5.4.350.0030.04719.09
5.4.340.0030.03719.09
5.4.320.0070.03319.21
5.4.310.0030.06019.12
5.4.300.0070.06019.22
5.4.290.0000.04019.18
5.4.280.0000.04019.11
5.4.270.0000.03319.03
5.4.260.0030.04019.18
5.4.250.0000.04319.04
5.4.240.0000.04019.13
5.4.230.0030.04019.05
5.4.220.0070.03019.02
5.4.210.0030.03718.87
5.4.200.0070.07719.23
5.4.190.0000.03318.84
5.4.180.0000.04318.85
5.4.170.0030.03718.84
5.4.160.0030.03719.21
5.4.150.0000.04018.86
5.4.140.0000.04316.41
5.4.130.0000.03716.21
5.4.120.0030.03016.32
5.4.110.0070.03316.47
5.4.100.0100.04316.47
5.4.90.0030.04316.40
5.4.80.0200.03716.42
5.4.70.0100.07316.45
5.4.60.0070.06316.50
5.4.50.0070.07316.36
5.4.40.0030.05016.34
5.4.30.0100.04016.31
5.4.20.0100.06716.47
5.4.10.0030.07716.36
5.4.00.0100.07315.88
5.3.290.0000.04014.76
5.3.280.0100.07314.72
5.3.270.0030.03714.66
5.3.260.0070.03014.67
5.3.250.0030.03714.67
5.3.240.0000.04014.58
5.3.230.0000.04314.66
5.3.220.0070.02714.49
5.3.210.0070.03314.49
5.3.200.0000.04014.62
5.3.190.0100.06714.52
5.3.180.0100.07314.50
5.3.170.0100.07314.64
5.3.160.0070.07314.57
5.3.150.0070.05014.68
5.3.140.0070.07014.51
5.3.130.0070.07714.49
5.3.120.0070.08014.60
5.3.110.0070.04314.61
5.3.100.0100.04714.09
5.3.90.0130.07013.96
5.3.80.0100.06714.00
5.3.70.0070.03713.94
5.3.60.0030.04013.93
5.3.50.0100.04014.04
5.3.40.0030.07714.03
5.3.30.0100.04313.96
5.3.20.0030.08013.75
5.3.10.0070.05713.75
5.3.00.0100.05713.69
5.2.170.0030.03013.53
5.2.160.0030.05713.53
5.2.150.0030.05713.53
5.2.140.0070.06013.53
5.2.130.0070.06013.53
5.2.120.0030.05013.53
5.2.110.0100.06013.53
5.2.100.0030.05713.53
5.2.90.0000.06013.53
5.2.80.0000.04713.53
5.2.70.0070.06013.53
5.2.60.0030.04313.53
5.2.50.0100.05313.53
5.2.40.0100.05713.53
5.2.30.0070.05713.53
5.2.20.0070.06013.53
5.2.10.0100.04313.53
5.2.00.0070.04013.53
5.1.60.0000.04313.53
5.1.50.0000.04013.53
5.1.40.0070.05013.53
5.1.30.0000.04713.53
5.1.20.0000.05713.53
5.1.10.0030.03313.53
5.1.00.0030.03013.53
5.0.50.0100.03713.53
5.0.40.0070.04313.53
5.0.30.0000.06713.53
5.0.20.0070.04013.53
5.0.10.0000.05013.53
5.0.00.0030.06313.53
4.4.90.0000.02313.53
4.4.80.0070.01713.53
4.4.70.0070.03313.53
4.4.60.0000.03713.53
4.4.50.0070.02713.53
4.4.40.0000.05013.53
4.4.30.0070.03013.53
4.4.20.0000.03013.53
4.4.10.0030.02013.53
4.4.00.0030.05313.53
4.3.110.0030.03313.53
4.3.100.0030.03313.53
4.3.90.0030.02313.53
4.3.80.0030.03313.53
4.3.70.0030.03313.53
4.3.60.0030.03313.53
4.3.50.0070.03313.53
4.3.40.0030.05313.53
4.3.30.0000.03313.53
4.3.20.0030.03013.53
4.3.10.0000.02313.53
4.3.00.0000.03713.53

preferences:
54.77 ms | 401 KiB | 5 Q