3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * For this test someone has written a lot of crap PHP code! * List all the problems you can find with this code and why it is a problem * */ function countVowelsInFile($f) { $handle = fopen($f, 'r'); while (!feof($handle)) $buf = fgets($handle, 4096); for ($i = 0; $i < strlen($buf); $i++) { if ($buf[$i] == 'a') $a++; if ($buf[$i] == 'e') $e++; if ($buf[$i] == 'i') $i++; if ($buf[$i] == 'o') $o++; if ($buf[$i] == 'u') $u++; if ($buf[$i] == 'e') $e++; } fclose($handle); return $a + $e + $i + $o + $u; } countVowelsInFile(__FILE__);

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.0030.01716.88
8.3.50.0110.00922.17
8.3.40.0120.00319.02
8.3.30.0090.00619.17
8.3.20.0000.00720.19
8.3.10.0080.00023.56
8.3.00.0030.00717.93
8.2.180.0110.01117.00
8.2.170.0150.00022.96
8.2.160.0070.00720.47
8.2.150.0000.00824.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0050.00319.48
8.2.110.0000.00919.21
8.2.100.0070.00417.84
8.2.90.0060.00319.17
8.2.80.0080.00017.97
8.2.70.0050.00317.71
8.2.60.0040.00417.93
8.2.50.0030.00618.07
8.2.40.0040.00418.28
8.2.30.0000.00818.25
8.2.20.0000.00717.71
8.2.10.0000.00818.18
8.2.00.0020.00517.88
8.1.280.0070.00725.92
8.1.270.0050.00323.97
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0000.00921.31
8.1.230.0110.00017.58
8.1.220.0000.00817.78
8.1.210.0060.00318.77
8.1.200.0060.00317.35
8.1.190.0000.00817.35
8.1.180.0000.00818.10
8.1.170.0040.00418.48
8.1.160.0040.00421.94
8.1.150.0080.00018.66
8.1.140.0040.00417.42
8.1.130.0000.00817.84
8.1.120.0000.00817.46
8.1.110.0000.00717.49
8.1.100.0030.00517.32
8.1.90.0050.00317.38
8.1.80.0070.00017.43
8.1.70.0030.00317.36
8.1.60.0040.00417.50
8.1.50.0000.00817.54
8.1.40.0040.00417.48
8.1.30.0000.00817.67
8.1.20.0030.00517.71
8.1.10.0040.00417.46
8.1.00.0060.00317.43
8.0.300.0070.00018.77
8.0.290.0040.00416.88
8.0.280.0000.00718.59
8.0.270.0070.00017.34
8.0.260.0000.00617.36
8.0.250.0030.00317.09
8.0.240.0050.00517.14
8.0.230.0030.00317.13
8.0.220.0000.00717.06
8.0.210.0030.00517.05
8.0.200.0040.00416.97
8.0.190.0040.00417.01
8.0.180.0050.00217.08
8.0.170.0050.00316.95
8.0.160.0000.00817.09
8.0.150.0110.00017.06
8.0.140.0000.00717.00
8.0.130.0000.00613.41
8.0.120.0050.00317.05
8.0.110.0000.00717.00
8.0.100.0030.00616.92
8.0.90.0000.00716.86
8.0.80.0100.00616.98
8.0.70.0020.00517.14
8.0.60.0040.00416.98
8.0.50.0040.00416.83
8.0.30.0140.00817.15
8.0.20.0070.01717.40
8.0.10.0000.00716.96
8.0.00.0050.01416.84
7.4.330.0000.00715.00
7.4.320.0030.00316.67
7.4.300.0060.00016.61
7.4.290.0030.00616.52
7.4.280.0040.00416.61
7.4.270.0030.00316.53
7.4.260.0000.00716.46
7.4.250.0040.00416.55
7.4.240.0020.00516.63
7.4.230.0030.00316.72
7.4.220.0060.01216.54
7.4.210.0100.01016.63
7.4.200.0000.00716.63
7.4.160.0080.00816.74
7.4.150.0090.01017.40
7.4.140.0080.01217.86
7.4.130.0100.00716.42
7.4.120.0130.01016.50
7.4.110.0060.00916.54
7.4.100.0180.00016.64
7.4.90.0130.00316.43
7.4.80.0110.01119.39
7.4.70.0100.00816.71
7.4.60.0060.01116.50
7.4.50.0060.00316.68
7.4.40.0070.01516.54
7.4.30.0090.00816.60
7.4.00.0060.01015.21
7.3.330.0000.00513.24
7.3.320.0000.00713.50
7.3.310.0000.00716.50
7.3.300.0070.00016.38
7.3.290.0060.01216.48
7.3.280.0080.01016.49
7.3.270.0090.00917.40
7.3.260.0120.00616.45
7.3.250.0050.01216.46
7.3.240.0190.00316.43
7.3.230.0140.00316.39
7.3.210.0130.00616.52
7.3.200.0080.00819.39
7.3.190.0100.00716.53
7.3.180.0000.01816.42
7.3.170.0120.00916.46
7.3.160.0110.00616.48
7.3.120.0060.01014.85
7.2.330.0060.01216.65
7.2.320.0060.01216.71
7.2.310.0130.00316.59
7.2.300.0030.01316.80
7.2.290.0030.01616.72
7.2.00.0030.00919.33
7.1.100.0050.00818.14
7.1.70.0090.00617.11
7.1.60.0070.00317.17
7.1.50.0130.01317.03
7.1.00.0030.07722.36
7.0.200.0000.01716.82
7.0.140.0070.07321.96
7.0.60.0070.08019.82
7.0.50.0070.03717.88
7.0.40.0130.06320.11
7.0.30.0230.08320.26
7.0.20.0270.06720.13
7.0.10.0200.07720.13
7.0.00.0030.04320.09
5.6.280.0030.07321.00
5.6.210.0030.08020.54
5.6.200.0130.08018.15
5.6.190.0130.08020.52
5.6.180.0070.08020.48
5.6.170.0270.04320.48
5.6.160.0170.07720.44
5.6.150.0130.08018.23
5.6.140.0030.04318.28
5.6.130.0100.07318.14
5.6.120.0100.03720.89
5.6.110.0070.09021.14
5.6.100.0000.04321.03
5.6.90.0130.07720.98
5.6.80.0100.06720.39
5.6.70.0300.05720.49
5.5.350.0030.08020.40
5.5.340.0030.07318.02
5.5.330.0100.05020.30
5.5.320.0130.08720.32
5.5.310.0370.04320.20
5.5.300.0070.04317.98
5.5.290.0130.06318.04
5.5.280.0230.06720.89
5.5.270.0000.05020.88
5.5.260.0100.07020.80
5.5.250.0070.08320.66
5.5.240.0070.07720.13
5.4.450.0070.06019.28
5.4.440.0100.05719.55
5.4.430.0330.05719.19
5.4.420.0170.05719.27
5.4.410.0130.05319.06
5.4.400.0170.04019.32
5.4.390.0000.05719.00
5.4.380.0170.07319.32
5.4.370.0230.06719.10
5.4.360.0200.05719.14
5.4.350.0200.07019.14
5.4.340.0130.07319.13
5.4.320.0030.06718.85
5.4.310.0070.03719.20
5.4.300.0300.07719.18
5.4.290.0300.06318.99
5.4.280.0200.05319.08
5.4.270.0330.06019.09
5.4.260.0300.06718.94
5.4.250.0100.08018.98
5.4.240.0170.07019.30
5.4.230.0170.07319.07
5.4.220.0100.07319.10
5.4.210.0100.04719.31
5.4.200.0170.07718.97
5.4.190.0100.05019.12
5.4.180.0130.04319.22
5.4.170.0130.05719.15
5.4.160.0230.06019.29
5.4.150.0170.05018.93
5.4.140.0170.07316.36
5.4.130.0170.07316.51
5.4.120.0230.03716.30
5.4.110.0130.07016.45
5.4.100.0030.05716.35
5.4.90.0170.04716.29
5.4.80.0170.07016.34
5.4.70.0130.03016.21
5.4.60.0130.07316.45
5.4.50.0070.04716.45
5.4.40.0070.07316.56
5.4.30.0070.04716.32
5.4.20.0100.07316.17
5.4.10.0170.04316.42
5.4.00.0100.07015.83
5.3.290.0130.04014.77
5.3.280.0130.06714.62
5.3.270.0170.06314.53
5.3.260.0100.07714.62
5.3.250.0130.07314.71
5.3.240.0230.04014.80
5.3.230.0130.05014.54
5.3.220.0200.06014.63
5.3.210.0200.07014.66
5.3.200.0070.07314.67
5.3.190.0130.07014.51
5.3.180.0030.08014.51
5.3.170.0100.04714.67
5.3.160.0100.08014.49
5.3.150.0100.04014.74
5.3.140.0230.05014.55
5.3.130.0200.07014.56
5.3.120.0130.07314.61
5.3.110.0070.05014.54
5.3.100.0100.04314.06
5.3.90.0130.07014.26
5.3.80.0030.05713.96
5.3.70.0100.03714.05
5.3.60.0130.03314.00
5.3.50.0130.03313.97
5.3.40.0170.04314.19
5.3.30.0300.04013.86
5.3.20.0170.04713.78
5.3.10.0070.07313.61
5.3.00.0100.07713.59
5.2.170.0100.03713.13
5.2.160.0070.03713.13
5.2.150.0170.04313.13
5.2.140.0130.06013.13
5.2.130.0100.03013.13
5.2.120.0070.06313.13
5.2.110.0130.03313.13
5.2.100.0130.05713.13
5.2.90.0170.05013.13
5.2.80.0170.06013.13
5.2.70.0070.06013.13
5.2.60.0170.03713.13
5.2.50.0100.03713.13
5.2.40.0100.06713.13
5.2.30.0270.04313.13
5.2.20.0070.04013.13
5.2.10.0030.03013.13
5.2.00.0000.04013.13
5.1.60.0030.03313.13
5.1.50.0030.05713.13
5.1.40.0070.04013.13
5.1.30.0030.05013.13
5.1.20.0070.05713.13
5.1.10.0100.05013.13
5.1.00.0000.04313.13
5.0.50.0030.05013.13
5.0.40.0070.04313.13
5.0.30.0070.04013.13
5.0.20.0070.02013.13
5.0.10.0000.02713.13
5.0.00.0100.06013.13
4.4.90.0030.02713.13
4.4.80.0030.02013.13
4.4.70.0000.04013.13
4.4.60.0030.02713.13
4.4.50.0030.01713.13
4.4.40.0030.05713.13
4.4.30.0000.04013.13
4.4.20.0030.03713.13
4.4.10.0030.02013.13
4.4.00.0000.04013.13
4.3.110.0000.02713.13
4.3.100.0000.02313.13
4.3.90.0070.03313.13
4.3.80.0000.04313.13
4.3.70.0030.02013.13
4.3.60.0030.03313.13
4.3.50.0000.02313.13
4.3.40.0030.05313.13
4.3.30.0030.02013.13
4.3.20.0000.04013.13
4.3.10.0000.02013.13
4.3.00.0000.02313.13

preferences:
44.15 ms | 401 KiB | 5 Q