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); 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.40.0160.00018.71
8.3.30.0070.00719.27
8.3.20.0020.00520.39
8.3.10.0080.00023.61
8.3.00.0080.00417.93
8.2.170.0120.00322.96
8.2.160.0150.00620.35
8.2.150.0060.00324.18
8.2.140.0080.00024.66
8.2.130.0030.00326.16
8.2.120.0030.00619.13
8.2.110.0030.00720.57
8.2.100.0080.00417.78
8.2.90.0080.00019.17
8.2.80.0040.00417.97
8.2.70.0050.00517.63
8.2.60.0040.00417.80
8.2.50.0030.00518.07
8.2.40.0040.00418.09
8.2.30.0040.00418.24
8.2.20.0040.00417.68
8.2.10.0040.00417.99
8.2.00.0050.00319.34
8.1.270.0040.00423.96
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00620.97
8.1.230.0000.01117.46
8.1.220.0060.00317.74
8.1.210.0030.00718.77
8.1.200.0030.00617.10
8.1.190.0040.00417.10
8.1.180.0000.00818.10
8.1.170.0000.00818.52
8.1.160.0060.00321.95
8.1.150.0040.00418.54
8.1.140.0040.00417.36
8.1.130.0030.00317.79
8.1.120.0070.00017.38
8.1.110.0000.00717.31
8.1.100.0040.00417.25
8.1.90.0030.00317.34
8.1.80.0040.00417.32
8.1.70.0000.00717.26
8.1.60.0000.00917.51
8.1.50.0040.00417.48
8.1.40.0070.00017.42
8.1.30.0030.00517.57
8.1.20.0000.00817.54
8.1.10.0040.00417.55
8.1.00.0000.00717.42
8.0.300.0000.00718.77
8.0.290.0070.00016.88
8.0.280.0030.00318.50
8.0.270.0000.00717.24
8.0.260.0030.00317.16
8.0.250.0030.00316.99
8.0.240.0060.00317.07
8.0.230.0040.00317.02
8.0.220.0000.00716.93
8.0.210.0050.00216.99
8.0.200.0040.00416.94
8.0.190.0030.00616.92
8.0.180.0060.00316.97
8.0.170.0030.00616.88
8.0.160.0030.00316.95
8.0.150.0070.00016.80
8.0.140.0040.00416.80
8.0.130.0000.00613.36
8.0.120.0000.00816.94
8.0.110.0020.00516.85
8.0.100.0000.00816.85
8.0.90.0040.00416.76
8.0.80.0070.01016.93
8.0.70.0040.00416.94
8.0.60.0040.00416.98
8.0.50.0040.00416.95
8.0.30.0130.00717.02
8.0.20.0110.00817.40
8.0.10.0000.00817.06
8.0.00.0120.00716.73
7.4.330.0030.00615.00
7.4.320.0120.00416.48
7.4.300.0060.01116.44
7.4.290.0070.00316.35
7.4.280.0100.00316.41
7.4.270.0070.00816.44
7.4.260.0100.00016.40
7.4.250.0120.00616.27
7.4.240.0070.00716.35
7.4.230.0070.00716.58
7.4.220.0450.01416.37
7.4.210.0280.01116.41
7.4.200.0060.01116.45
7.4.160.0180.00816.46
7.4.150.0360.02417.40
7.4.140.0340.01217.86
7.4.130.0360.00516.46
7.4.120.0240.01416.46
7.4.110.0070.01616.44
7.4.100.0230.00716.39
7.4.90.0100.01016.49
7.4.80.1630.04019.39
7.4.70.0380.03816.43
7.4.60.0200.01216.50
7.4.50.0000.00516.23
7.4.40.0720.01516.59
7.4.30.0250.00716.55
7.3.330.0040.00413.13
7.3.320.0060.00613.17
7.3.310.0060.00316.14
7.3.300.0060.00616.15
7.3.290.0190.01316.26
7.3.280.0140.02116.20
7.3.270.0270.01017.40
7.3.260.0410.01016.47
7.3.250.0310.01516.25
7.3.240.0230.01616.34
7.3.230.0840.00816.39
7.3.210.0540.01116.30
7.3.200.0130.00619.39
7.3.190.0710.00616.41
7.3.180.0230.01716.30
7.3.170.1100.02516.27
7.3.160.0060.01216.27
7.2.330.0220.02416.71
7.2.320.0360.01616.36
7.2.310.0130.01316.35
7.2.300.0240.00916.47
7.2.290.0270.04116.43
7.1.70.0040.00416.93
7.1.60.0110.00017.31
7.1.50.0040.01116.79
7.1.40.0000.01116.61
7.1.30.0040.01116.89
7.1.20.0030.00716.86
7.1.10.0120.00617.88
7.1.00.0080.00417.88
7.0.200.0030.00716.79
7.0.190.0030.00316.55
7.0.180.0080.00316.16
7.0.170.0000.00816.28
7.0.160.0000.00816.23
7.0.150.0050.00517.88
7.0.140.0050.00517.88
7.0.130.0030.00917.88
7.0.120.0030.00917.88
7.0.110.0040.01017.88
7.0.100.0070.00517.88
7.0.90.0100.00517.88
7.0.80.0040.01117.88
7.0.70.0080.00417.88
7.0.60.0070.00417.88
7.0.50.0060.00917.88
7.0.40.0040.00917.88
7.0.30.0000.01017.88
7.0.20.0090.01217.88
7.0.10.0040.00817.88
7.0.00.0110.00017.88
5.6.300.0090.03821.02
5.6.290.0040.05120.69
5.6.280.0030.07120.81
5.6.270.0130.06320.98
5.6.260.0030.04821.07
5.6.250.0070.04620.88
5.6.240.0060.04420.96
5.6.230.0040.05020.84
5.6.220.0000.07320.94
5.6.210.0070.03921.02
5.6.200.0030.04520.91
5.6.190.0150.06720.79
5.6.180.0070.05721.04
5.6.170.0030.04721.04
5.6.160.0150.03321.00
5.6.150.0030.04320.97
5.6.140.0100.04520.82
5.6.130.0040.04521.00
5.6.120.0110.03621.04
5.6.110.0030.05221.04
5.6.100.0100.04120.95
5.6.90.0070.04020.94
5.6.80.0040.04120.21
5.6.70.0040.04120.25
5.6.60.0040.06820.41
5.6.50.0100.03820.42
5.6.40.0040.03920.20
5.6.30.0070.03920.23
5.6.20.0030.04420.23
5.6.10.0060.04220.10
5.6.00.0100.03920.18
5.5.380.0030.05517.88
5.5.370.0060.05217.88
5.5.360.0070.04317.88
5.5.350.0060.03917.88
5.5.340.0000.06218.09
5.5.330.0000.04617.88
5.5.320.0070.06417.88
5.5.310.0000.05817.88
5.5.300.0130.04217.90
5.5.290.0030.05418.03
5.5.280.0030.04617.98
5.5.270.0030.03917.88
5.5.260.0070.03717.88
5.5.250.0030.04617.88
5.5.240.0000.04117.88
5.5.230.0030.08417.88
5.5.220.0100.06417.88
5.5.210.0030.04017.88
5.5.200.0030.05717.88
5.5.190.0000.04117.88
5.5.180.0030.04317.88
5.5.160.0030.07817.88
5.5.150.0000.04417.88
5.5.140.0070.06517.88
5.5.130.0000.04417.88
5.5.120.0030.05917.88
5.5.110.0000.04017.88
5.5.100.0030.04717.88
5.5.90.0030.03817.88
5.5.80.0030.04417.88
5.5.70.0000.05717.88
5.5.60.0070.03417.88
5.5.50.0000.04017.88
5.5.40.0130.03417.88
5.5.30.0060.03917.88
5.5.20.0000.04517.88
5.5.10.0060.03517.88
5.5.00.0060.03517.88
5.4.450.0060.04419.40
5.4.440.0000.06319.24
5.4.430.0060.03519.11
5.4.420.0000.04119.34
5.4.410.0070.03419.09
5.4.400.0040.03618.83
5.4.390.0070.06018.85
5.4.380.0030.04018.80
5.4.370.0030.03819.03
5.4.360.0030.04319.05
5.4.350.0030.05018.88
5.4.340.0030.04618.80
5.4.320.0070.03718.86
5.4.310.0060.05219.00
5.4.300.0000.04519.14
5.4.290.0060.03419.03
5.4.280.0070.03419.04
5.4.270.0070.06618.91
5.4.260.0070.04318.86
5.4.250.0070.04318.91
5.4.240.0060.03419.04
5.4.230.0000.05019.06
5.4.220.0030.03818.98
5.4.210.0000.04418.93
5.4.200.0030.04119.13
5.4.190.0000.04518.86
5.4.180.0030.03718.95
5.4.170.0030.03718.84
5.4.160.0030.03919.12
5.4.150.0030.04118.80
5.4.140.0030.04717.88
5.4.130.0070.03017.88
5.4.120.0000.04417.88
5.4.110.0060.03717.88
5.4.100.0040.03517.88
5.4.90.0000.04317.88
5.4.80.0030.03817.88
5.4.70.0030.03917.88
5.4.60.0000.05217.88
5.4.50.0030.04017.88
5.4.40.0060.03517.88
5.4.30.0030.04217.88
5.4.20.0060.03317.88
5.4.10.0040.03517.88
5.4.00.0000.03617.88
5.3.290.0030.04817.88
5.3.280.0000.04117.88
5.3.270.0100.03217.88
5.3.260.0070.03617.88
5.3.250.0000.04417.88
5.3.240.0100.03817.88
5.3.230.0100.04817.88
5.3.220.0070.04617.88
5.3.210.0000.04417.88
5.3.200.0060.05117.88
5.3.190.0210.04217.88
5.3.180.0040.03617.88
5.3.170.0030.04217.88
5.3.160.0030.04117.88
5.3.150.0030.05017.88
5.3.140.0060.04217.88
5.3.130.0000.04117.88
5.3.120.0000.04317.88
5.3.110.0000.04317.88
5.3.100.0090.03017.88
5.3.90.0030.04617.88
5.3.80.0030.03517.88
5.3.70.0030.03817.88
5.3.60.0030.03817.88
5.3.50.0040.03917.88
5.3.40.0070.05017.88
5.3.30.0030.06117.88
5.3.20.0060.04217.88
5.3.10.0000.04517.88
5.3.00.0030.05117.88

preferences:
67.36 ms | 400 KiB | 5 Q