3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dword = '00'; for ($i = 0; $i < 500; ++$i){ $dword = dword_inc($dword); echo $dword."\n"; } function dword_inc($dword){ if (empty($dword)){ return '1'; } $last = $dword{strlen($dword)-1}; if ($last == 9){ $last = 'A'; }else{ $last++; } if ($last == 'G'){ $last = 0; if (strlen($dword) > 1){ $dword2 = dword_inc(substr($dword, 0, strlen($dword)-1)); $dword = $dword2.'0'; }else{ $dword = '1'.$dword; } }else{ $dword{strlen($dword)-1} = $last; } return $dword; }

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.0170.00316.63
8.3.50.0080.00721.87
8.3.40.0160.00018.47
8.3.30.0130.00318.75
8.3.20.0050.00320.28
8.3.10.0040.00423.65
8.3.00.0040.00719.17
8.2.180.0060.01016.50
8.2.170.0120.00322.96
8.2.160.0110.00420.32
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0030.00519.23
8.2.110.0080.00022.17
8.2.100.0040.00818.00
8.2.90.0030.00519.04
8.2.80.0030.00617.97
8.2.70.0060.00317.38
8.2.60.0090.00317.80
8.2.50.0040.00418.07
8.2.40.0000.00719.95
8.2.30.0000.00718.00
8.2.20.0050.00217.37
8.2.10.0040.00417.74
8.2.00.0040.00419.25
8.1.280.0110.00425.92
8.1.270.0090.00023.92
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00323.93
8.1.230.0110.00018.91
8.1.220.0090.00017.74
8.1.210.0030.00518.77
8.1.200.0060.00317.10
8.1.190.0000.00817.10
8.1.180.0030.00618.10
8.1.170.0000.00918.39
8.1.160.0040.00421.85
8.1.150.0050.00318.40
8.1.140.0040.00417.28
8.1.130.0050.00217.75
8.1.120.0070.00017.30
8.1.110.0000.00717.34
8.1.100.0040.00417.19
8.1.90.0070.00017.38
8.1.80.0040.00417.20
8.1.70.0030.00317.29
8.1.60.0040.00417.43
8.1.50.0040.00417.29
8.1.40.0040.00417.29
8.1.30.0000.00817.46
8.1.20.0040.00417.50
8.1.10.0000.00717.37
8.1.00.0000.00817.20
8.0.300.0060.00318.77
8.0.290.0000.00716.63
8.0.280.0070.00018.21
8.0.270.0030.00317.12
8.0.260.0030.00317.05
8.0.250.0030.00316.79
8.0.240.0000.00616.84
8.0.230.0040.00416.96
8.0.220.0000.00716.80
8.0.210.0030.00316.86
8.0.200.0040.00416.84
8.0.190.0000.00716.75
8.0.180.0030.00416.85
8.0.170.0040.00416.82
8.0.160.0040.00416.89
8.0.150.0030.00316.66
8.0.140.0000.00716.74
8.0.130.0040.00413.21
8.0.120.0040.00416.79
8.0.110.0050.00316.80
8.0.100.0040.00416.82
8.0.90.0040.00416.71
8.0.80.0120.00916.74
8.0.70.0080.00016.71
8.0.60.0040.00416.88
8.0.50.0040.00416.68
8.0.30.0060.01617.01
8.0.20.0140.01217.40
8.0.10.0050.00216.83
8.0.00.0070.01116.60
7.4.330.0030.00315.00
7.4.320.0000.00716.49
7.4.300.0040.00416.62
7.4.290.0040.00416.39
7.4.280.0000.00816.43
7.4.270.0040.00416.55
7.4.260.0110.00016.51
7.4.250.0090.00016.50
7.4.240.0040.00416.52
7.4.230.0000.00716.73
7.4.220.0030.01716.58
7.4.210.0140.00416.66
7.4.200.0000.00816.36
7.4.160.0190.00316.60
7.4.150.0120.00617.40
7.4.140.0130.00917.86
7.4.130.0160.00716.59
7.4.120.0070.01316.60
7.4.110.0060.01516.79
7.4.100.0080.01716.51
7.4.90.0070.01416.43
7.4.80.0090.01219.39
7.4.70.0100.01716.68
7.4.60.0060.01216.44
7.4.50.0000.00816.21
7.4.40.0160.00416.52
7.4.30.0080.01116.66
7.4.00.0030.01415.23
7.3.330.0000.00513.33
7.3.320.0000.00513.21
7.3.310.0000.00716.22
7.3.300.0030.00316.32
7.3.290.0120.00616.40
7.3.280.0080.01116.36
7.3.270.0110.01117.40
7.3.260.0170.00616.58
7.3.250.0120.01016.49
7.3.240.0110.01116.39
7.3.230.0070.01716.61
7.3.210.0040.01616.31
7.3.200.0120.00816.50
7.3.190.0120.01516.65
7.3.180.0140.00316.44
7.3.170.0160.01016.58
7.3.160.0090.01216.58
7.3.120.0030.00615.11
7.3.10.0070.01016.41
7.3.00.0120.00316.52
7.2.330.0130.00716.75
7.2.320.0170.00616.79
7.2.310.0130.00716.69
7.2.300.0110.01116.75
7.2.290.0090.01416.94
7.2.130.0090.00617.04
7.2.120.0080.00816.92
7.2.110.0070.01016.82
7.2.100.0040.00816.87
7.2.90.0100.00717.13
7.2.80.0090.00916.98
7.2.70.0110.00416.91
7.2.60.0070.01117.13
7.2.50.0050.00517.10
7.2.40.0090.00616.96
7.2.30.0000.01416.88
7.2.20.0070.00716.92
7.2.10.0030.00716.84
7.2.00.0100.00318.06
7.1.250.0030.00715.65
7.1.100.0030.00918.11
7.1.70.0030.00617.12
7.1.60.0030.02219.70
7.1.50.0090.00616.70
7.1.00.0000.08022.45
7.0.200.0000.00816.61
7.0.140.0000.07022.05
7.0.120.0030.04322.07
7.0.110.0030.04321.98
7.0.100.0000.05022.13
7.0.90.0030.06021.96
7.0.80.0100.05022.11
7.0.70.0000.04321.89
7.0.60.0100.07721.66
7.0.50.0070.07722.00
7.0.40.0070.06720.05
7.0.30.0070.04019.93
7.0.20.0000.07719.96
7.0.10.0070.06019.91
7.0.00.0030.07320.14
5.6.280.0100.07020.77
5.6.270.0000.04720.82
5.6.260.0100.03320.93
5.6.250.0030.04020.98
5.6.240.0100.06721.08
5.6.230.0100.03720.79
5.6.220.0000.03720.81
5.6.210.0100.07720.96
5.6.200.0070.05020.95
5.6.190.0030.08020.87
5.6.180.0070.05020.88
5.6.170.0030.04320.98
5.6.160.0130.06320.89
5.6.150.0070.04021.01
5.6.140.0130.07020.88
5.6.130.0100.05720.98
5.6.120.0130.03720.77
5.6.110.0000.07020.68
5.6.100.0030.06320.77
5.6.90.0030.04020.85
5.6.80.0070.05720.27
5.6.70.0030.03720.26
5.6.60.0070.05320.32
5.6.50.0100.06720.30
5.6.40.0130.07320.39
5.6.30.0130.04020.14
5.6.20.0070.07020.38
5.6.10.0070.07320.05
5.6.00.0130.08320.12
5.5.380.0030.03717.55
5.5.370.0030.08717.59
5.5.360.0030.05717.55
5.5.350.0000.07317.62
5.5.340.0070.07018.13
5.5.330.0000.06318.09
5.5.320.0070.06317.91
5.5.310.0000.05718.25
5.5.300.0070.08018.07
5.5.290.0070.06318.22
5.5.280.0000.04318.04
5.5.270.0030.05318.21
5.5.260.0100.03317.91
5.5.250.0030.04017.86
5.5.240.0070.04317.52
5.5.230.0000.04017.61
5.5.220.0030.05317.44
5.5.210.0000.05317.29
5.5.200.0000.06017.57
5.5.190.0000.04017.18
5.5.180.0000.04017.48
5.5.160.0030.06717.28
5.5.150.0070.02717.62
5.5.140.0070.04017.30
5.5.130.0000.04017.47
5.5.120.0000.03717.60
5.5.110.0030.07717.18
5.5.100.0030.03717.48
5.5.90.0100.06317.47
5.5.80.0000.07717.33
5.5.70.0030.04717.34
5.5.60.0030.03717.34
5.5.50.0070.05317.15
5.5.40.0030.03717.31
5.5.30.0000.03717.16
5.5.20.0000.05017.49
5.5.10.0000.04017.12
5.5.00.0000.04017.42
5.4.450.0000.06719.33
5.4.440.0000.06719.50
5.4.430.0030.03719.37
5.4.420.0030.04719.27
5.4.410.0070.03319.46
5.4.400.0070.04018.96
5.4.390.0030.04019.03
5.4.380.0070.03318.96
5.4.370.0000.08318.98
5.4.360.0100.06318.93
5.4.350.0030.04318.93
5.4.340.0030.07718.93
5.4.320.0000.04719.13
5.4.310.0170.03019.13
5.4.300.0100.03019.17
5.4.290.0070.03018.93
5.4.280.0000.04318.96
5.4.270.0070.05718.95
5.4.260.0070.05019.13
5.4.250.0070.05319.07
5.4.240.0030.04019.02
5.4.230.0100.02718.89
5.4.220.0030.05319.07
5.4.210.0070.03318.85
5.4.200.0100.03019.12
5.4.190.0070.06718.89
5.4.180.0000.04019.01
5.4.170.0030.04718.92
5.4.160.0030.09019.12
5.4.150.0030.03719.00
5.4.140.0070.07016.54
5.4.130.0000.04716.57
5.4.120.0070.05016.61
5.4.110.0030.05016.42
5.4.100.0100.06316.49
5.4.90.0000.04016.21
5.4.80.0070.04316.36
5.4.70.0030.04716.21
5.4.60.0100.05316.39
5.4.50.0070.07316.34
5.4.40.0000.06316.44
5.4.30.0030.04716.28
5.4.20.0030.06716.38
5.4.10.0000.07016.50
5.4.00.0000.04016.02
5.3.290.0070.06714.79
5.3.280.0000.03714.61
5.3.270.0000.04014.59
5.3.260.0000.06314.65
5.3.250.0070.03314.75
5.3.240.0030.03314.59
5.3.230.0070.05014.72
5.3.220.0070.06014.65
5.3.210.0000.07014.58
5.3.200.0030.04714.60
5.3.190.0000.06314.52
5.3.180.0000.07714.65
5.3.170.0070.03314.71
5.3.160.0000.07014.57
5.3.150.0000.06014.55
5.3.140.0000.03714.51
5.3.130.0030.05014.55
5.3.120.0070.05314.56
5.3.110.0070.07014.52
5.3.100.0000.08314.07
5.3.90.0000.06014.11
5.3.80.0000.07014.02
5.3.70.0000.05713.98
5.3.60.0000.07714.10
5.3.50.0070.07013.93
5.3.40.0000.06313.93
5.3.30.0030.05013.95
5.3.20.0000.03313.83
5.3.10.0000.04013.66
5.3.00.0100.04313.63
5.2.170.0000.05711.14
5.2.160.0030.07011.22
5.2.150.0030.06311.10
5.2.140.0000.06311.14
5.2.130.0030.06010.95
5.2.120.0070.05011.12
5.2.110.0000.02711.06
5.2.100.0030.05711.09
5.2.90.0030.03711.23
5.2.80.0070.06011.32
5.2.70.0000.06011.10
5.2.60.0030.05311.14
5.2.50.0130.03011.11
5.2.40.0000.03311.14
5.2.30.0070.05311.19
5.2.20.0000.06011.18
5.2.10.0000.03310.88
5.2.00.0000.03310.67
5.1.60.0070.05010.15
5.1.50.0030.04710.15
5.1.40.0100.03710.15
5.1.30.0000.05710.20
5.1.20.0070.04710.21
5.1.10.0000.02310.15
5.1.00.0000.04710.33
5.0.50.0030.04310.15
5.0.40.0030.03710.15
5.0.30.0070.05710.15
5.0.20.0000.04310.15
5.0.10.0000.05010.15
5.0.00.0070.05310.15
4.4.90.0070.03710.15
4.4.80.0030.01310.15
4.4.70.0000.03010.15
4.4.60.0000.03710.15
4.4.50.0070.02010.15
4.4.40.0030.05310.15
4.4.30.0000.03310.15
4.4.20.0030.03310.15
4.4.10.0030.01310.15
4.4.00.0030.02010.15
4.3.110.0030.03310.15
4.3.100.0000.01710.15
4.3.90.0030.02710.15
4.3.80.0000.04710.15
4.3.70.0030.03010.15
4.3.60.0000.02310.15
4.3.50.0000.04010.15
4.3.40.0000.05010.15
4.3.30.0000.01710.15
4.3.20.0000.03710.15
4.3.10.0030.01310.15
4.3.00.0030.03710.15

preferences:
40.77 ms | 401 KiB | 5 Q