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 "\n";//for new line use <br/> } } 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.01318.18
8.3.50.0110.01021.21
8.3.40.0140.00018.76
8.3.30.0100.00320.34
8.3.20.0090.00020.21
8.3.10.0080.00021.97
8.3.00.0070.00022.46
8.2.180.0140.00725.92
8.2.170.0190.00018.85
8.2.160.0100.00722.18
8.2.150.0080.00024.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0080.00020.78
8.2.110.0030.00620.38
8.2.100.0110.00017.78
8.2.90.0030.00619.26
8.2.80.0000.00819.47
8.2.70.0040.00417.63
8.2.60.0040.00418.04
8.2.50.0000.00818.07
8.2.40.0000.00819.82
8.2.30.0070.00319.39
8.2.20.0040.00417.68
8.2.10.0040.00417.80
8.2.00.0000.00817.73
8.1.280.0120.00325.92
8.1.270.0090.00023.99
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0070.00322.08
8.1.230.0070.00420.98
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0030.00717.47
8.1.190.0040.00417.41
8.1.180.0050.00318.10
8.1.170.0080.00018.52
8.1.160.0050.00218.79
8.1.150.0040.00418.59
8.1.140.0000.00717.44
8.1.130.0000.00717.74
8.1.120.0000.00717.42
8.1.110.0050.00317.29
8.1.100.0000.00817.46
8.1.90.0000.00717.29
8.1.80.0070.00017.37
8.1.70.0000.00717.35
8.1.60.0000.00817.59
8.1.50.0000.00817.44
8.1.40.0000.00817.51
8.1.30.0000.00817.66
8.1.20.0000.00817.62
8.1.10.0000.00717.44
8.1.00.0040.00417.28
8.0.300.0000.00918.77
8.0.290.0000.00717.04
8.0.280.0070.00018.40
8.0.270.0000.00717.29
8.0.260.0000.00716.83
8.0.250.0030.00316.89
8.0.240.0040.00416.83
8.0.230.0040.00416.93
8.0.220.0030.00316.76
8.0.210.0070.00016.79
8.0.200.0030.00316.84
8.0.190.0000.00816.97
8.0.180.0030.00416.95
8.0.170.0070.00016.78
8.0.160.0000.00716.88
8.0.150.0040.00416.93
8.0.140.0040.00416.84
8.0.130.0030.00313.39
8.0.120.0040.00416.84
8.0.110.0000.00716.78
8.0.100.0040.00416.76
8.0.90.0000.00716.78
8.0.80.0130.00316.85
8.0.70.0080.00016.80
8.0.60.0050.00216.72
8.0.50.0000.00716.90
8.0.30.0060.01116.96
8.0.20.0080.01417.41
8.0.10.0000.00816.83
8.0.00.0130.00516.80
7.4.330.0000.00515.00
7.4.320.0060.00016.57
7.4.300.0030.00316.52
7.4.290.0030.00316.61
7.4.280.0080.00016.51
7.4.270.0000.00716.59
7.4.260.0060.00013.30
7.4.250.0030.00416.55
7.4.240.0020.00516.46
7.4.230.0000.00716.39
7.4.220.0140.00416.57
7.4.210.0100.00716.50
7.4.200.0070.00016.35
7.4.190.0080.00016.69
7.4.160.0150.00916.48
7.4.150.0180.00017.40
7.4.140.0050.01217.86
7.4.130.0100.00816.48
7.4.120.0110.00716.58
7.4.110.0130.00516.62
7.4.100.0140.00416.52
7.4.90.0120.00616.43
7.4.80.0110.01419.39
7.4.70.0080.00816.43
7.4.60.0130.00316.50
7.4.50.0030.00616.48
7.4.40.0040.01122.77
7.4.30.0040.01416.58
7.4.00.0000.01715.26
7.3.330.0030.00313.32
7.3.320.0000.00813.26
7.3.310.0020.00516.33
7.3.300.0000.00616.32
7.3.290.0090.00416.30
7.3.280.0060.01016.28
7.3.270.0060.01917.40
7.3.260.0080.00816.55
7.3.250.0140.00516.42
7.3.240.0080.00816.35
7.3.230.0080.00916.50
7.3.210.0140.00316.57
7.3.200.0150.00319.39
7.3.190.0120.00416.53
7.3.180.0080.01216.41
7.3.170.0050.01116.30
7.3.160.0040.01116.38
7.3.120.0000.01815.04
7.3.10.0090.00316.81
7.3.00.0050.00716.45
7.2.330.0170.00016.44
7.2.320.0000.01716.72
7.2.310.0040.01416.43
7.2.300.0060.00916.32
7.2.290.0110.00616.41
7.2.130.0050.01116.59
7.2.120.0060.00716.72
7.2.110.0030.01216.79
7.2.100.0080.00616.83
7.2.90.0050.01016.92
7.2.80.0040.00916.90
7.2.70.0070.00516.89
7.2.60.0050.00616.92
7.2.50.0020.01116.89
7.2.40.0050.00816.82
7.2.30.0040.00916.90
7.2.20.0110.00416.96
7.2.10.0090.00516.93
7.2.00.0050.00717.70
7.1.250.0000.01315.58
7.1.240.0060.00315.19
7.1.230.0030.00715.59
7.1.220.0000.01015.61
7.1.210.0030.00615.36
7.1.200.0060.00615.66
7.1.190.0000.00815.59
7.1.180.0070.00315.57
7.1.170.0060.00315.36
7.1.160.0070.00715.80
7.1.150.0100.00315.55
7.1.140.0070.00015.84
7.1.130.0070.00315.57
7.1.120.0040.00715.46
7.1.110.0040.00715.52
7.1.100.0090.00516.88
7.1.90.0070.00415.51
7.1.80.0030.00915.56
7.1.70.0020.00716.29
7.1.60.0070.00917.50
7.1.50.0070.01016.30
7.1.40.0060.00815.51
7.1.30.0040.00715.43
7.1.20.0070.00715.59
7.1.10.0040.00715.79
7.1.00.0020.04219.01
7.0.330.0070.00715.29
7.0.320.0090.00615.31
7.0.310.0070.00315.07
7.0.300.0070.00715.34
7.0.290.0000.00715.34
7.0.280.0070.00015.36
7.0.270.0030.00615.19
7.0.260.0050.00315.23
7.0.250.0000.01115.17
7.0.240.0030.00915.50
7.0.230.0030.00715.59
7.0.220.0060.00315.44
7.0.210.0000.01115.27
7.0.200.0080.00116.18
7.0.190.0030.00615.19
7.0.180.0060.00315.30
7.0.170.0000.01215.50
7.0.160.0000.00815.18
7.0.150.0040.00715.49
7.0.140.0030.04018.83
7.0.130.0040.00815.11
7.0.120.0000.01315.36
7.0.110.0000.01315.26
7.0.100.0040.00415.13
7.0.90.0030.00915.46
7.0.80.0000.01015.37
7.0.70.0050.04318.42
7.0.60.0090.03718.47
7.0.50.0050.04318.68
7.0.40.0030.04616.80
7.0.30.0040.04916.84
7.0.20.0100.03816.79
7.0.10.0090.03816.69
7.0.00.0030.05016.66
5.6.380.0030.00614.57
5.6.370.0030.01014.58
5.6.360.0090.00314.02
5.6.350.0070.00714.01
5.6.340.0000.01214.22
5.6.330.0030.01014.41
5.6.320.0000.01214.03
5.6.310.0070.00414.38
5.6.300.0110.00014.45
5.6.290.0030.00914.45
5.6.280.0080.03517.53
5.6.270.0030.00514.20
5.6.260.0000.01614.27
5.6.250.0070.00314.64
5.6.240.0070.00414.25
5.6.230.0050.00514.25
5.6.220.0030.02517.33
5.6.210.0030.04017.43
5.6.200.0050.04717.76
5.6.190.0060.04517.60
5.6.180.0060.03917.73
5.6.170.0050.04217.62
5.6.160.0050.03517.73
5.6.150.0080.03917.52
5.6.140.0060.02617.70
5.6.130.0030.03017.68
5.6.120.0050.03617.60
5.6.110.0050.04517.81
5.6.100.0030.04717.71
5.6.90.0090.04617.60
5.6.80.0080.04017.38
5.6.70.0040.04417.27
5.6.60.0100.02717.28
5.6.50.0060.04317.32
5.6.40.0030.03217.36
5.6.30.0060.02317.47
5.6.20.0050.04017.35
5.6.10.0060.03717.32
5.6.00.0020.03817.27
5.5.380.0060.00611.18
5.5.370.0040.00711.18
5.5.360.0020.02915.80
5.5.350.0020.02715.95
5.5.340.0030.04316.12
5.5.330.0030.04515.91
5.5.320.0030.04415.95
5.5.310.0020.03116.07
5.5.300.0060.04116.10
5.5.290.0070.04015.96
5.5.280.0050.04015.97
5.5.270.0080.04515.99
5.5.260.0040.04516.03
5.5.250.0030.04415.85
5.5.240.0060.04015.73
5.5.230.0030.03615.73
5.5.220.0020.03015.74
5.5.210.0090.03715.65
5.5.200.0020.03415.68
5.5.190.0040.04315.77
5.5.180.0060.04115.68
5.5.170.0030.00311.18
5.5.160.0030.03615.66
5.5.150.0030.04315.66
5.5.140.0000.04715.74
5.5.130.0070.04015.72
5.5.120.0050.04015.63
5.5.110.0040.03815.70
5.5.100.0020.04315.64
5.5.90.0060.03915.65
5.5.80.0070.03515.62
5.5.70.0050.02915.57
5.5.60.0030.04015.56
5.5.50.0050.03815.64
5.5.40.0070.03815.61
5.5.30.0030.04315.64
5.5.20.0050.04615.61
5.5.10.0050.04215.65
5.5.00.0070.04115.58
5.4.450.0020.03415.42
5.4.440.0050.04315.32
5.4.430.0050.03215.21
5.4.420.0080.04015.31
5.4.410.0030.04415.27
5.4.400.0030.04415.17
5.4.390.0030.04215.21
5.4.380.0050.03215.04
5.4.370.0050.03815.21
5.4.360.0030.03815.04
5.4.350.0040.03915.11
5.4.340.0040.03315.20
5.4.330.0000.00911.18
5.4.320.0050.03915.21
5.4.310.0050.03815.16
5.4.300.0030.03715.15
5.4.290.0020.04315.04
5.4.280.0050.04415.19
5.4.270.0080.03615.11
5.4.260.0010.02615.06
5.4.250.0050.03815.19
5.4.240.0050.02615.06
5.4.230.0020.04215.10
5.4.220.0020.04715.19
5.4.210.0060.03615.16
5.4.200.0040.03515.02
5.4.190.0080.03515.02
5.4.180.0080.03615.16
5.4.170.0020.03515.10
5.4.160.0050.04115.14
5.4.150.0070.03815.18
5.4.140.0020.04013.81
5.4.130.0020.04313.79
5.4.120.0040.03813.79
5.4.110.0030.04513.72
5.4.100.0000.03713.78
5.4.90.0030.03513.76
5.4.80.0050.02713.81
5.4.70.0050.03513.73
5.4.60.0100.03613.73
5.4.50.0030.04113.77
5.4.40.0030.03313.79
5.4.30.0040.03313.75
5.4.20.0020.03913.79
5.4.10.0050.03913.79
5.4.00.0000.03413.53
5.3.290.0040.04012.94
5.3.280.0020.03012.86
5.3.270.0030.03312.92
5.3.260.0020.04512.91
5.3.250.0020.03212.86
5.3.240.0030.04312.88
5.3.230.0030.04212.94
5.3.220.0050.03812.87
5.3.210.0060.03712.88
5.3.200.0050.03312.92
5.3.190.0040.04012.90
5.3.180.0030.03212.88
5.3.170.0070.03712.93
5.3.160.0030.04212.90
5.3.150.0030.04012.88
5.3.140.0070.03712.87
5.3.130.0070.02312.92
5.3.120.0020.03812.88
5.3.110.0040.04412.91
5.3.100.0030.04112.59
5.3.90.0050.02412.61
5.3.80.0020.03212.60
5.3.70.0000.04312.65
5.3.60.0020.04012.60
5.3.50.0030.03812.60
5.3.40.0070.03512.55
5.3.30.0010.03612.55
5.3.20.0030.03612.49
5.3.10.0000.03312.41
5.3.00.0020.03512.46
5.2.170.0030.03011.69
5.2.160.0030.01811.69
5.2.150.0040.03011.69
5.2.140.0070.03011.69
5.2.130.0060.03011.69
5.2.120.0050.02711.69
5.2.110.0040.02811.69
5.2.100.0000.03111.69
5.2.90.0030.03011.69
5.2.80.0020.02911.69
5.2.70.0050.02311.69
5.2.60.0020.03511.69
5.2.50.0030.03211.69
5.2.40.0050.03011.69
5.2.30.0050.03511.69
5.2.20.0000.02711.69
5.2.10.0030.03311.69
5.2.00.0030.02711.69
5.1.60.0030.02811.69
5.1.50.0050.02211.69
5.1.40.0060.02511.69
5.1.30.0050.03111.69
5.1.20.0000.03211.69
5.1.10.0050.01611.69
5.1.00.0000.02911.69
5.0.50.0030.02311.69
5.0.40.0020.02011.69
5.0.30.0000.03511.69
5.0.20.0040.01511.69
5.0.10.0020.01511.69
5.0.00.0030.02911.69
4.4.90.0030.01711.69
4.4.80.0020.01711.69
4.4.70.0000.01711.69
4.4.60.0020.02211.69
4.4.50.0000.01811.69
4.4.40.0020.02811.69
4.4.30.0020.01711.69
4.4.20.0050.01211.69
4.4.10.0000.02111.69
4.4.00.0040.02811.69
4.3.110.0030.01811.69
4.3.100.0020.01211.69
4.3.90.0000.01611.69
4.3.80.0050.02211.69
4.3.70.0010.02111.69
4.3.60.0040.01511.69
4.3.50.0040.01511.69
4.3.40.0020.02511.69
4.3.30.0020.01811.69
4.3.20.0000.02111.69
4.3.10.0020.01811.69
4.3.00.0030.01811.69

preferences:
59.55 ms | 401 KiB | 5 Q