3v4l.org

run code in 300+ PHP versions simultaneously
<?php $p =<<<EOT That interviews should involve simple code is now common wisdom in programming circles. The story is that a high percentage of programmers, even people with impressive resumes, “just can’t code.” Asked to do the simplest things—problems a good coders could solve as fast they could write—some spend ten or twenty minutes before they get an answer, or fail entirely. (See discussion by Jeff Attwood and Joel Spolsky.) I don’t go as far as others here. I think a lot of “slow coders” are probably excellent employees, making up for it in other areas. Some projects don’t need speed. Some people just need to spend more time programming; everyone was a slow programmer some time. But I know from experience that slow coders don’t work at LibraryThing. They don’t fit the LibraryThing development culture. EOT; $pattern = '[\w\d]+'; $words = array(); preg_match_all('/'.$pattern.'/', $p, $words); $words = $words[0]; $result = array(); foreach ($words as $word) { $len = mb_strlen($word); if (isset($result[$len])) { $result[$len]++; } else { $result[$len] = 1; } }

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.0140.00718.40
8.3.50.0080.00921.27
8.3.40.0120.00318.95
8.3.30.0040.01119.21
8.3.20.0050.00220.34
8.3.10.0070.00722.09
8.3.00.0070.00022.57
8.2.180.0040.01116.63
8.2.170.0140.00022.96
8.2.160.0060.00919.19
8.2.150.0030.01024.18
8.2.140.0050.00324.66
8.2.130.0150.00026.16
8.2.120.0030.00519.36
8.2.110.0030.00620.53
8.2.100.0110.00018.03
8.2.90.0060.00319.34
8.2.80.0080.00017.97
8.2.70.0030.00717.75
8.2.60.0080.00018.05
8.2.50.0030.00618.07
8.2.40.0050.00318.06
8.2.30.0040.00418.06
8.2.20.0040.00417.73
8.2.10.0040.00417.77
8.2.00.0030.00717.77
8.1.280.0080.01325.92
8.1.270.0000.00822.24
8.1.260.0000.01426.35
8.1.250.0080.00028.09
8.1.240.0070.00323.73
8.1.230.0080.00322.67
8.1.220.0060.00317.78
8.1.210.0030.00518.77
8.1.200.0030.00617.38
8.1.190.0040.00417.43
8.1.180.0040.00420.55
8.1.170.0000.00818.68
8.1.160.0040.00422.21
8.1.150.0040.00418.72
8.1.140.0020.00517.61
8.1.130.0000.00717.82
8.1.120.0040.00417.66
8.1.110.0020.00517.64
8.1.100.0040.00417.66
8.1.90.0000.00717.49
8.1.80.0030.00317.53
8.1.70.0050.00217.62
8.1.60.0040.00417.79
8.1.50.0070.00017.73
8.1.40.0030.00617.65
8.1.30.0080.00017.87
8.1.20.0080.00017.89
8.1.10.0040.00417.70
8.1.00.0040.00417.59
8.0.300.0040.00418.77
8.0.290.0000.00717.16
8.0.280.0050.00218.63
8.0.270.0030.00317.34
8.0.260.0030.00316.97
8.0.250.0050.00217.30
8.0.240.0000.00817.13
8.0.230.0000.00717.23
8.0.220.0040.00417.08
8.0.210.0000.00717.19
8.0.200.0040.00417.19
8.0.190.0040.00417.22
8.0.180.0000.00817.21
8.0.170.0080.00017.08
8.0.160.0000.00817.13
8.0.150.0040.00417.10
8.0.140.0040.00417.16
8.0.130.0000.00613.63
8.0.120.0080.00017.13
8.0.110.0040.00417.07
8.0.100.0070.00017.20
8.0.90.0050.00216.99
8.0.80.0120.00417.11
8.0.70.0000.00817.16
8.0.60.0020.00517.28
8.0.50.0070.00017.07
8.0.30.0160.01017.39
8.0.20.0110.00817.40
8.0.10.0040.00417.11
8.0.00.0100.01117.05
7.4.330.0050.00015.00
7.4.320.0000.00616.62
7.4.300.0070.00016.71
7.4.290.0000.00716.71
7.4.280.0030.00316.71
7.4.270.0080.00016.82
7.4.260.0100.00016.63
7.4.250.0000.00916.68
7.4.240.0030.00516.75
7.4.230.0000.00716.72
7.4.220.0200.00316.68
7.4.210.0090.00616.81
7.4.200.0000.00716.72
7.4.190.0000.00716.86
7.4.160.0080.00816.68
7.4.150.0100.00717.40
7.4.140.0090.01017.86
7.4.130.0110.00616.74
7.4.120.0130.00616.86
7.4.110.0100.00716.87
7.4.100.0070.01116.60
7.4.90.0030.01616.57
7.4.80.0070.01019.39
7.4.70.0030.02016.71
7.4.60.0090.00916.69
7.4.50.0060.00316.55
7.4.40.0090.00322.77
7.4.30.0090.01316.79
7.4.00.0000.01014.99
7.3.330.0000.00613.38
7.3.320.0000.00513.38
7.3.310.0030.00316.49
7.3.300.0030.00316.55
7.3.290.0100.00616.50
7.3.280.0120.00316.59
7.3.270.0060.01117.40
7.3.260.0030.01316.79
7.3.250.0120.00716.63
7.3.240.0100.01016.59
7.3.230.0060.01216.82
7.3.210.0060.01216.64
7.3.200.0160.00316.81
7.3.190.0090.00916.70
7.3.180.0090.00616.64
7.3.170.0060.01016.49
7.3.160.0100.00716.70
7.3.120.0090.00314.96
7.3.10.0100.00316.66
7.3.00.0030.00716.69
7.2.330.0140.00316.76
7.2.320.0110.00616.82
7.2.310.0030.01316.79
7.2.300.0070.01716.89
7.2.290.0090.00916.98
7.2.130.0000.01016.88
7.2.120.0040.01116.99
7.2.110.0040.01117.20
7.2.100.0070.00717.20
7.2.90.0060.00316.89
7.2.80.0070.00716.82
7.2.70.0000.01417.21
7.2.60.0020.00917.06
7.2.50.0110.00417.25
7.2.40.0060.00616.86
7.2.30.0070.00717.14
7.2.20.0110.00316.99
7.2.10.0080.00817.31
7.2.00.0000.01517.34
7.1.250.0000.00915.98
7.1.200.0040.00716.07
7.1.70.0040.00417.46
7.1.60.0060.01017.61
7.1.50.0100.01416.93
7.1.00.0030.03322.44
7.0.200.0030.00916.82
7.0.140.0030.07321.97
7.0.60.0070.07719.88
7.0.50.0030.06317.79
7.0.40.0070.07320.25
7.0.30.0270.03720.04
7.0.20.0370.06320.19
7.0.10.0270.08020.32
7.0.00.0070.06320.18
5.6.280.0030.07721.04
5.6.210.0070.05720.51
5.6.200.0100.08018.21
5.6.190.0000.04720.41
5.6.180.3970.04320.32
5.6.170.0230.04320.33
5.6.160.0100.08020.33
5.6.150.0200.07318.21
5.6.140.0100.08018.18
5.6.130.0070.06018.10
5.6.120.0130.05320.97
5.6.110.0100.07320.98
5.6.100.0030.09021.05
5.6.90.0130.07320.98
5.6.80.0070.04020.28
5.6.70.0270.06020.39
5.5.350.0030.08720.33
5.5.340.0030.08317.97
5.5.330.0100.07320.40
5.5.320.0100.06320.34
5.5.310.0170.04020.43
5.5.300.0100.06717.96
5.5.290.0070.07317.98
5.5.280.0030.06020.69
5.5.270.0030.05320.74
5.5.260.0030.04320.88
5.5.250.0030.08320.71
5.5.240.0130.07720.16
5.4.450.0700.06319.13
5.4.440.0770.05719.45
5.4.430.0600.05719.41
5.4.420.0630.06319.13
5.4.410.0670.05719.19
5.4.400.0330.05318.83
5.4.390.0430.04018.52
5.4.380.0230.05318.51
5.4.370.0170.05018.68
5.4.360.0130.05018.52
5.4.350.0100.05718.55
5.4.340.0200.04718.55
5.4.320.0060.04112.48
5.4.310.0100.04312.47
5.4.300.0080.04012.48
5.4.290.0080.04612.47
5.4.280.0070.03412.37
5.4.270.0020.04112.37
5.4.260.0200.06018.78
5.4.250.0070.08019.02
5.4.240.0170.07718.89
5.4.230.0130.07718.74
5.4.220.0100.06319.03
5.4.210.0170.06319.02
5.4.200.0200.07018.98
5.4.190.0170.05718.93
5.4.180.0030.08019.01
5.4.170.0100.06718.93
5.4.160.0130.06318.71
5.4.150.0300.06018.68
5.4.140.0130.06716.27
5.4.130.0130.06716.27
5.4.120.0100.05716.52
5.4.110.0100.07316.43
5.4.100.0130.06016.34
5.4.90.0130.04316.36
5.4.80.0070.05316.32
5.4.70.0070.07716.20
5.4.60.0030.07316.39
5.4.50.0030.05316.38
5.4.40.0130.04316.47
5.4.30.0030.07716.21
5.4.20.0030.05316.21
5.4.10.0070.06016.47
5.4.00.0100.06315.72
5.3.290.0050.04712.80
5.3.280.0130.06014.32
5.3.270.0100.05314.65
5.3.260.0070.05714.50
5.3.250.0070.07714.55
5.3.240.0230.05014.33
5.3.230.0100.05314.63
5.3.220.0130.06714.48
5.3.210.0100.07714.37
5.3.200.0100.06714.61
5.3.190.0130.06314.59
5.3.180.0030.07014.74
5.3.170.0070.07714.46
5.3.160.0130.05014.44
5.3.150.0030.07714.68
5.3.140.0200.06014.60
5.3.130.0070.07714.59
5.3.120.0130.06014.59
5.3.110.0000.06714.57
5.3.100.0130.05313.83
5.3.90.0030.06314.05
5.3.80.0070.06014.03
5.3.70.0030.06014.13
5.3.60.0100.06313.88
5.3.50.0000.07713.67
5.3.40.0100.05013.98
5.3.30.0100.06013.95
5.3.20.0100.06013.72
5.3.10.0030.06313.77
5.3.00.0130.06313.52
5.2.170.0100.06311.19
5.2.160.0100.05311.01
5.2.150.0030.04711.26
5.2.140.0070.05311.05
5.2.130.0000.05711.05
5.2.120.0100.04310.89
5.2.110.0170.04010.88
5.2.100.0130.06011.27
5.2.90.0000.05711.04
5.2.80.0070.05711.13
5.2.70.0030.06311.27
5.2.60.0030.06011.19
5.2.50.0030.05311.06
5.2.40.0030.05711.12
5.2.30.0070.04311.15
5.2.20.0170.04310.95
5.2.10.0070.05010.84
5.2.00.0100.05310.94
5.1.60.0030.04710.27
5.1.50.0130.03710.04
5.1.40.0070.03010.20
5.1.30.0070.04010.49
5.1.20.0030.04010.44
5.1.10.0130.04310.09
5.1.00.0030.04310.36
5.0.50.0000.0378.67
5.0.40.0070.0308.57
5.0.30.0030.0608.54
5.0.20.0100.0308.46
5.0.10.0030.0378.25
5.0.00.0070.0538.27
4.4.90.0070.0237.30
4.4.80.0000.0337.30
4.4.70.0030.0207.30
4.4.60.0000.0307.30
4.4.50.0000.0237.30
4.4.40.0030.0407.30
4.4.30.0030.0207.30
4.4.20.0070.0307.30
4.4.10.0030.0237.30
4.4.00.0030.0337.30
4.3.110.0000.0337.30
4.3.100.0030.0307.30
4.3.90.0000.0337.30
4.3.80.0030.0407.30
4.3.70.0070.0207.30
4.3.60.0030.0277.30
4.3.50.0030.0337.30
4.3.40.0070.0437.30
4.3.30.0100.0277.30
4.3.20.0130.0207.30
4.3.10.0030.0277.30
4.3.00.0070.0277.27

preferences:
45.64 ms | 401 KiB | 5 Q