3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dword = '00000000'; for ($i = 0; $i < 10; ++$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.0120.00618.55
8.3.50.0220.00821.98
8.3.40.0100.00318.41
8.3.30.0100.00718.84
8.3.20.0040.00420.04
8.3.10.0050.00323.36
8.3.00.0050.00521.02
8.2.180.0110.00716.32
8.2.170.0030.01422.96
8.2.160.0130.00720.52
8.2.150.0040.00424.18
8.2.140.0130.00324.66
8.2.130.0000.00826.16
8.2.120.0030.00519.23
8.2.110.0060.00322.30
8.2.100.0130.00017.78
8.2.90.0040.00418.92
8.2.80.0030.00517.97
8.2.70.0030.00617.50
8.2.60.0040.00817.80
8.2.50.0080.00018.07
8.2.40.0000.00819.97
8.2.30.0040.00418.00
8.2.20.0070.00017.47
8.2.10.0040.00417.88
8.2.00.0040.00419.27
8.1.280.0140.00325.92
8.1.270.0120.00323.97
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0040.00424.02
8.1.230.0070.00418.96
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0000.01117.22
8.1.190.0000.00817.41
8.1.180.0000.00818.10
8.1.170.0080.00018.36
8.1.160.0080.00021.86
8.1.150.0070.00018.53
8.1.140.0000.00817.37
8.1.130.0000.00717.65
8.1.120.0000.00417.30
8.1.110.0040.00417.20
8.1.100.0030.00417.24
8.1.90.0000.00817.21
8.1.80.0070.00017.32
8.1.70.0000.00717.22
8.1.60.0000.00917.46
8.1.50.0060.00317.43
8.1.40.0000.00817.43
8.1.30.0040.00417.39
8.1.20.0040.00417.54
8.1.10.0070.00017.34
8.1.00.0050.00317.27
8.0.300.0000.00718.77
8.0.290.0080.00017.03
8.0.280.0030.00318.37
8.0.270.0000.00717.12
8.0.260.0030.00317.04
8.0.250.0040.00416.89
8.0.240.0070.00016.89
8.0.230.0000.00716.82
8.0.220.0030.00316.85
8.0.210.0030.00316.69
8.0.200.0030.00316.82
8.0.190.0030.00316.95
8.0.180.0000.00816.79
8.0.170.0000.00716.90
8.0.160.0000.00716.89
8.0.150.0040.00416.84
8.0.140.0060.00316.75
8.0.130.0030.00313.24
8.0.120.0030.00616.66
8.0.110.0080.00016.78
8.0.100.0040.00416.62
8.0.90.0050.00216.70
8.0.80.0060.00916.77
8.0.70.0030.00516.77
8.0.60.0030.00316.71
8.0.50.0030.00516.86
8.0.30.0100.00816.92
8.0.20.0120.00817.40
8.0.10.0000.00816.93
8.0.00.0120.00616.62
7.4.330.0000.00515.00
7.4.320.0000.00716.62
7.4.300.0030.00316.53
7.4.290.0070.00016.61
7.4.280.0080.00016.52
7.4.270.0040.00416.52
7.4.260.0000.00716.61
7.4.250.0070.00016.41
7.4.240.0050.00216.63
7.4.230.0040.00416.71
7.4.220.0100.01016.59
7.4.210.0130.00016.64
7.4.200.0070.00016.27
7.4.160.0140.00816.40
7.4.150.0060.01217.40
7.4.140.0090.01117.86
7.4.130.0080.00816.46
7.4.120.0090.00916.57
7.4.110.0100.00716.49
7.4.100.0110.00816.62
7.4.90.0060.01116.57
7.4.80.0110.00919.39
7.4.70.0130.00316.46
7.4.60.0100.00616.57
7.4.50.0060.00316.55
7.4.40.0120.00616.50
7.4.30.0060.01016.51
7.4.00.0050.01414.92
7.3.330.0050.00013.39
7.3.320.0050.00013.34
7.3.310.0020.00516.44
7.3.300.0000.00716.32
7.3.290.0040.01116.35
7.3.280.0070.01116.36
7.3.270.0150.00417.40
7.3.260.0100.00716.65
7.3.250.0120.00616.48
7.3.240.0130.00316.36
7.3.230.0070.01016.50
7.3.210.0120.00616.65
7.3.200.0110.00619.39
7.3.190.0130.01016.45
7.3.180.0060.00916.39
7.3.170.0110.00416.43
7.3.160.0120.00416.42
7.3.120.0050.00914.88
7.3.110.0040.01214.89
7.3.100.0000.01514.91
7.3.90.0100.00714.94
7.3.80.0000.01215.09
7.3.70.0070.00714.69
7.3.60.0090.00614.62
7.3.50.0030.01714.73
7.3.40.0070.00714.71
7.3.30.0110.00414.85
7.3.20.0070.00816.76
7.3.10.0090.00516.46
7.3.00.0070.00716.83
7.2.330.0120.00616.77
7.2.320.0060.01116.80
7.2.310.0090.00916.83
7.2.300.0110.00716.66
7.2.290.0130.00316.60
7.2.250.0090.00915.26
7.2.240.0110.00715.04
7.2.230.0060.00615.31
7.2.220.0030.00915.37
7.2.210.0140.00314.75
7.2.200.0040.00815.29
7.2.190.0090.00614.93
7.2.180.0040.01114.97
7.2.170.0030.01015.20
7.2.130.0040.01117.16
7.2.120.0060.00917.01
7.2.110.0030.01016.75
7.2.100.0080.00617.12
7.2.90.0130.00316.95
7.2.80.0090.00916.93
7.2.70.0070.00316.98
7.2.60.0060.01017.09
7.2.50.0030.00916.95
7.2.40.0120.00317.11
7.2.30.0070.00716.97
7.2.20.0030.01117.06
7.2.10.0070.00716.71
7.2.00.0040.00416.76
7.1.330.0000.01315.79
7.1.320.0030.01115.75
7.1.310.0040.00415.93
7.1.300.0000.02115.97
7.1.290.0080.00415.91
7.1.280.0070.01015.80
7.1.270.0060.00915.69
7.1.260.0070.00715.71
7.1.250.0040.00815.80
7.1.70.0000.00817.09
7.1.60.0070.01719.70
7.1.50.0140.00716.96
7.1.00.0000.07722.35
7.0.200.0030.00716.85
7.0.140.0030.07022.08
7.0.60.0170.06319.92
7.0.50.0000.04317.92
7.0.40.0070.05020.21
7.0.30.0330.07320.12
7.0.20.0330.07720.07
7.0.10.0100.04020.08
7.0.00.0070.06020.12
5.6.280.0100.06721.09
5.6.210.0000.08020.63
5.6.200.0100.06718.24
5.6.190.0070.05320.64
5.6.180.4100.03720.61
5.6.170.0300.04720.45
5.6.160.0130.07720.44
5.6.150.0100.07718.25
5.6.140.0100.06018.18
5.6.130.0030.05018.24
5.6.120.0070.09020.99
5.6.110.0100.08021.03
5.6.100.0200.06721.08
5.6.90.0100.08021.13
5.6.80.0070.03320.38
5.6.70.4300.03320.41
5.5.350.0030.08720.37
5.5.340.0070.08318.00
5.5.330.0130.07720.26
5.5.320.0200.04320.27
5.5.310.0200.03720.32
5.5.300.0130.06017.95
5.5.290.0030.04017.98
5.5.280.0100.07320.87
5.5.270.0100.07720.98
5.5.260.0070.07720.73
5.5.250.0130.07320.68
5.5.240.0300.07720.26
5.4.450.3870.03719.46
5.4.440.3830.04719.27
5.4.430.3570.03319.38
5.4.420.3970.03719.30
5.4.410.3670.03719.07
5.4.400.3800.03319.23
5.4.390.3770.04319.13
5.4.380.3730.03719.13
5.4.370.3330.03318.87
5.4.360.3370.03318.98
5.4.350.3730.03019.13
5.4.340.3570.04318.89
5.4.320.3870.04719.07
5.4.310.3600.03719.04
5.4.300.3630.04018.86
5.4.290.3400.03319.06
5.4.280.3370.03319.04
5.4.270.3870.03719.13
5.4.260.3370.03719.08
5.4.250.3630.04019.14
5.4.240.3330.04018.93
5.4.230.3470.04319.24
5.4.220.3330.04019.14
5.4.210.3370.03319.08
5.4.200.3130.03319.07
5.4.190.3370.03719.21
5.4.180.3370.03719.04
5.4.170.3200.04019.05
5.4.160.3370.03319.06
5.4.150.3630.04019.20
5.4.140.3700.03716.35
5.4.130.4230.04016.66
5.4.120.4100.03016.49
5.4.110.3970.03016.19
5.4.100.4130.03316.55
5.4.90.3570.03716.36
5.4.80.3870.03716.44
5.4.70.3270.03316.34
5.4.60.3870.03316.56
5.4.50.3600.04016.16
5.4.40.3670.04016.18
5.4.30.3430.03716.53
5.4.20.3530.03716.42
5.4.10.4300.03316.42
5.4.00.3700.03715.86
5.3.290.3630.03314.63
5.3.280.3370.03714.52
5.3.270.2970.03014.69
5.3.260.4300.04314.51
5.3.250.3500.03014.68
5.3.240.3570.03714.72
5.3.230.4370.03314.60
5.3.220.3770.04014.55
5.3.210.4300.03314.47
5.3.200.4130.03714.64
5.3.190.3930.03014.66
5.3.180.3630.03314.47
5.3.170.3670.03314.55
5.3.160.3600.03314.55
5.3.150.3700.03014.48
5.3.140.3600.04014.71
5.3.130.3400.03014.70
5.3.120.3330.03314.46
5.3.110.3970.03314.45
5.3.100.4270.03713.95
5.3.90.3800.04714.10
5.3.80.3300.04013.93
5.3.70.3330.03314.02
5.3.60.4200.04014.08
5.3.50.4030.03714.07
5.3.40.3300.04014.02
5.3.30.3300.03714.04
5.3.20.3630.04013.70
5.3.10.4300.03713.88
5.3.00.4030.04013.55
5.2.170.3770.03711.23
5.2.160.3070.03011.27
5.2.150.2970.02711.07
5.2.140.2930.03011.05
5.2.130.3170.03011.22
5.2.120.3600.03011.02
5.2.110.3530.03011.11
5.2.100.3070.03011.00
5.2.90.3530.02711.15
5.2.80.3400.02311.01
5.2.70.3070.03011.00
5.2.60.3670.03011.02
5.2.50.3300.02710.94
5.2.40.3000.02710.91
5.2.30.2730.02010.89
5.2.20.3230.03010.93
5.2.10.2230.03311.02
5.2.00.2270.02310.79
5.1.60.2230.02710.22
5.1.50.2300.02310.05
5.1.40.2270.02010.20
5.1.30.2500.02710.34
5.1.20.2470.02010.50
5.1.10.2330.02710.05
5.1.00.2200.02710.15
5.0.50.1700.0208.48
5.0.40.1430.0138.43
5.0.30.1730.0308.29
5.0.20.1430.0178.36
5.0.10.1830.0178.11
5.0.00.1530.0338.15
4.4.90.1430.0177.51
4.4.80.1630.0137.51
4.4.70.1330.0177.51
4.4.60.1600.0207.51
4.4.50.1500.0177.51
4.4.40.1100.0277.51
4.4.30.1700.0137.51
4.4.20.1300.0177.51
4.4.10.1270.0137.51
4.4.00.1700.0307.51
4.3.110.1600.0177.51
4.3.100.1500.0137.51
4.3.90.1500.0137.51
4.3.80.1370.0237.51
4.3.70.1400.0177.51
4.3.60.1430.0207.51
4.3.50.1130.0137.51
4.3.40.1400.0207.51
4.3.30.0630.0177.51
4.3.20.0870.0237.51
4.3.10.0900.0207.51
4.3.00.0730.0207.51

preferences:
43.12 ms | 401 KiB | 5 Q