3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = <<<STR THEDLSDARNVNS CCVBXXMTGFRWS CVIYTVBVSDOPTR VBNMAITYSURFD MOTYYERSAWERTY MOITRUHDYRTBDI VNOWUNMBORN STR; $fib = [1,2,3,5,8,13]; foreach (explode(PHP_EOL, $str) as $line) { // hack to make the array 1-based var_dump($line); $arr = str_split($line); array_unshift($arr, 'foo'); unset($arr[0]); $arr = array_filter($arr); foreach ($arr as $pos => $c) { // start at if ($pos > 9) { $index = $pos % 9; } else { $index = $pos; } // if in $fib array if (in_array($index, $fib)) { echo $c; } } }

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.43
8.3.50.0070.01221.09
8.3.40.0070.00718.71
8.3.30.0120.00319.01
8.3.20.0040.00420.34
8.3.10.0030.00522.13
8.3.00.0080.00022.39
8.2.180.0030.01725.92
8.2.170.0090.00618.95
8.2.160.0000.01422.96
8.2.150.0080.00024.18
8.2.140.0060.00324.66
8.2.130.0080.00026.16
8.2.120.0040.00419.36
8.2.110.0060.00322.24
8.2.100.0000.01119.39
8.2.90.0000.00819.17
8.2.80.0050.00219.26
8.2.70.0000.00817.63
8.2.60.0040.00417.93
8.2.50.0040.00418.07
8.2.40.0000.00820.01
8.2.30.0050.00218.03
8.2.20.0050.00317.62
8.2.10.0060.00317.71
8.2.00.0040.00417.65
8.1.280.0140.00025.92
8.1.270.0080.00022.09
8.1.260.0080.00026.35
8.1.250.0060.00328.09
8.1.240.0060.00323.92
8.1.230.0090.00319.10
8.1.220.0040.00417.78
8.1.210.0000.00818.77
8.1.200.0030.00617.22
8.1.190.0040.00417.39
8.1.180.0040.00420.40
8.1.170.0040.00418.58
8.1.160.0040.00422.16
8.1.150.0040.00418.65
8.1.140.0000.00717.49
8.1.130.0040.00417.84
8.1.120.0040.00417.45
8.1.110.0040.00417.50
8.1.100.0000.00717.41
8.1.90.0080.00017.57
8.1.80.0000.00717.52
8.1.70.0000.00717.48
8.1.60.0030.00617.65
8.1.50.0060.00317.55
8.1.40.0000.01117.54
8.1.30.0000.00817.70
8.1.20.0050.00317.66
8.1.10.0040.00417.58
8.1.00.0050.00317.56
8.0.300.0040.00418.77
8.0.290.0000.00717.15
8.0.280.0070.00018.41
8.0.270.0070.00017.34
8.0.260.0000.00616.82
8.0.250.0040.00416.96
8.0.240.0000.00817.05
8.0.230.0070.00017.07
8.0.220.0060.00016.88
8.0.210.0050.00217.00
8.0.200.0000.00617.09
8.0.190.0040.00417.05
8.0.180.0000.00716.90
8.0.170.0040.00417.05
8.0.160.0080.00016.93
8.0.150.0000.00816.95
8.0.140.0040.00417.00
8.0.130.0000.00513.41
8.0.120.0040.00416.98
8.0.110.0000.00716.89
8.0.100.0040.00416.93
8.0.90.0050.00217.05
8.0.80.0080.00817.05
8.0.70.0040.00416.80
8.0.60.0000.00717.04
8.0.50.0000.00717.05
8.0.30.0120.01117.22
8.0.20.0060.01617.40
8.0.10.0040.00416.98
8.0.00.0100.01016.65
7.4.330.0050.00015.00
7.4.320.0060.00016.58
7.4.300.0030.00316.67
7.4.290.0030.00316.63
7.4.280.0030.00316.63
7.4.270.0030.00316.59
7.4.260.0030.00316.52
7.4.250.0040.00416.49
7.4.240.0070.00016.68
7.4.230.0030.00516.66
7.4.220.0000.01516.40
7.4.210.0060.00916.60
7.4.200.0040.00416.42
7.4.190.0030.00316.70
7.4.160.0100.00716.67
7.4.150.0110.00717.40
7.4.140.0080.01117.86
7.4.130.0100.00716.48
7.4.120.0060.01316.61
7.4.110.0110.01116.75
7.4.100.0030.02116.64
7.4.90.0150.00316.73
7.4.80.0140.00919.39
7.4.70.0060.01516.61
7.4.60.0080.00816.44
7.4.50.0000.00516.52
7.4.40.0070.00722.77
7.4.30.0050.01416.71
7.4.00.0030.01215.02
7.3.330.0030.00313.15
7.3.320.0030.00313.11
7.3.310.0050.00316.54
7.3.300.0030.00316.40
7.3.290.0090.00916.38
7.3.280.0090.00916.43
7.3.270.0130.00317.40
7.3.260.0090.00916.39
7.3.250.0090.01216.45
7.3.240.0060.01216.45
7.3.230.0090.00916.39
7.3.210.0180.00616.54
7.3.200.0040.01719.39
7.3.190.0110.01116.52
7.3.180.0090.00616.50
7.3.170.0070.01016.37
7.3.160.0060.01816.52
7.3.120.0030.01015.09
7.3.10.0040.01116.66
7.3.00.0070.00716.85
7.2.330.0120.00616.54
7.2.320.0070.01116.66
7.2.310.0100.01316.52
7.2.300.0170.00016.69
7.2.290.0110.01116.69
7.2.130.0110.00016.68
7.2.120.0050.00516.82
7.2.110.0060.00617.02
7.2.100.0040.00817.00
7.2.90.0040.00417.12
7.2.80.0070.00717.03
7.2.70.0060.00917.07
7.2.60.0000.00816.70
7.2.50.0120.00317.03
7.2.40.0030.00716.91
7.2.30.0000.01016.82
7.2.20.0070.00717.11
7.2.10.0070.00416.76
7.2.00.0060.00618.13
7.1.250.0030.00615.83
7.1.100.0000.01218.02
7.1.70.0030.01017.11
7.1.60.0160.00919.82
7.1.50.0070.01516.70
7.1.00.0000.07722.30
7.0.200.0030.00616.85
7.0.140.0000.07721.92
7.0.70.4300.04319.86
7.0.60.0070.08019.98
7.0.50.0070.08017.89
7.0.40.0000.09320.26
7.0.30.0170.08720.09
7.0.20.0470.06720.00
7.0.10.0400.07320.30
7.0.00.0030.05720.09
5.6.280.0000.07720.91
5.6.210.0070.08020.72
5.6.200.0070.06018.22
5.6.190.0170.07720.66
5.6.180.0370.07020.38
5.6.170.0270.05320.50
5.6.160.0200.07720.52
5.6.150.0030.08718.14
5.6.140.0100.07018.11
5.6.130.0070.05018.09
5.6.120.0100.06721.00
5.6.110.0030.06321.14
5.6.100.0070.08321.04
5.6.90.0100.06720.87
5.6.80.0030.08720.38
5.6.70.0200.07720.38
5.5.350.0100.07720.41
5.5.340.0130.06017.99
5.5.330.0030.09020.19
5.5.320.0030.08720.23
5.5.310.0400.06320.41
5.5.300.0130.04317.98
5.5.290.0030.08317.92
5.5.280.0130.05720.76
5.5.270.0070.05720.76
5.5.260.0070.08720.67
5.5.250.0030.04020.70
5.5.240.0070.07720.06
5.4.450.0070.06719.41
5.4.440.1000.05019.52
5.4.430.0100.06319.10
5.4.420.0830.07019.21
5.4.410.1030.04019.48
5.4.400.0530.07018.93
5.4.390.0970.06318.79
5.4.380.0170.07718.50
5.4.370.0200.04318.70
5.4.360.0100.05018.50
5.4.350.0060.04011.98
5.4.340.0080.03811.98
5.4.320.0080.04112.46
5.4.310.0090.04312.46
5.4.300.0100.03912.46
5.4.290.0030.04612.45
5.4.280.0060.03612.35
5.4.270.0040.04412.35
5.4.260.0070.05319.04
5.4.250.0170.04019.00
5.4.240.0070.05318.79
5.4.230.0030.06018.88
5.4.220.0030.06018.84
5.4.210.0100.04718.73
5.4.200.0070.05018.87
5.4.190.0100.05018.88
5.4.180.0130.04718.91
5.4.170.0030.05718.86
5.4.160.0030.06019.02
5.4.150.0130.07019.02
5.4.140.0030.06016.27
5.4.130.0130.06716.44
5.4.120.0100.06716.23
5.4.110.0130.06716.40
5.4.100.0100.06716.46
5.4.90.0130.04016.45
5.4.80.0130.06716.28
5.4.70.0070.06316.33
5.4.60.0100.05716.32
5.4.50.0070.05016.42
5.4.40.0070.06016.26
5.4.30.0070.05016.46
5.4.20.0130.04316.42
5.4.10.0200.06316.26
5.4.00.0130.04315.71
5.3.290.0040.04312.80
5.3.280.0030.05314.68
5.3.270.0130.04714.47
5.3.260.0170.04314.76
5.3.250.0100.06714.63
5.3.240.0100.05714.63
5.3.230.0100.05014.62
5.3.220.0100.05014.26
5.3.210.0030.05714.66
5.3.200.0170.04714.71
5.3.190.0030.05314.44
5.3.180.0170.04014.40
5.3.170.0130.04314.72
5.3.160.0070.05314.66
5.3.150.0070.07014.45
5.3.140.0100.04714.39
5.3.130.0100.07314.39
5.3.120.0130.04714.55
5.3.110.0130.04714.42
5.3.100.0130.04313.89
5.3.90.0130.05014.07
5.3.80.0130.06014.04
5.3.70.0000.06714.04
5.3.60.0030.05314.09
5.3.50.0070.07013.71
5.3.40.0070.05013.96
5.3.30.0100.06313.68
5.3.20.0130.04313.73
5.3.10.0100.05313.42
5.3.00.0030.05313.66
5.2.170.0100.03311.16
5.2.160.0030.04311.15
5.2.150.0070.04011.14
5.2.140.0000.04711.09
5.2.130.0000.04310.86
5.2.120.0030.04011.09
5.2.110.0030.04011.20
5.2.100.0130.03010.93
5.2.90.0000.04311.13
5.2.80.0170.04010.98
5.2.70.0030.06311.18
5.2.60.0130.03311.15
5.2.50.0030.04710.94
5.2.40.0030.04010.91
5.2.30.0070.04710.80
5.2.20.0100.04010.96
5.2.10.0030.04710.78
5.2.00.0070.05710.60
5.1.60.0070.04310.10
5.1.50.0070.04010.05
5.1.40.0070.0509.84
5.1.30.0070.03710.26
5.1.20.0100.03310.33
5.1.10.0070.03310.09
5.1.00.0100.0479.95
5.0.50.0030.0378.78
5.0.40.0070.0238.56
5.0.30.0000.0438.28
5.0.20.0100.0208.20
5.0.10.0030.0308.23
5.0.00.0030.0478.08
4.4.90.0000.0235.85
4.4.80.0070.0175.78
4.4.70.0070.0275.78
4.4.60.0000.0275.77
4.4.50.0030.0305.80
4.4.40.0030.0335.85
4.4.30.0170.0135.78
4.4.20.0070.0175.91
4.4.10.0030.0235.81
4.4.00.0030.0375.72
4.3.110.0030.0205.72
4.3.100.0030.0205.72
4.3.90.0000.0236.34
4.3.80.0000.0476.34
4.3.70.0070.0176.34
4.3.60.0000.0336.34
4.3.50.0030.0276.34
4.3.40.0000.0336.34
4.3.30.0000.0236.34
4.3.20.0030.0236.34
4.3.10.0030.0236.34
4.3.00.0070.0277.27

preferences:
44.18 ms | 401 KiB | 5 Q