3v4l.org

run code in 300+ PHP versions simultaneously
<?php function thing(array $needle, $haystack) { $haystack = array($haystack); foreach ($needle as $a) { $target = []; foreach ($haystack as $h) { $target = array_merge($target, explode($a, $h)); } $haystack = $target; } return $array_filter($haystack) + $needle; } var_dump(thing(array('THIS', 'test', 'hello', 'A', 'is'), 'helloTHISisAblindtest'));

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.0040.01118.63
8.3.30.0110.00319.09
8.3.20.0050.00320.16
8.3.10.0080.00023.56
8.3.00.0000.00722.40
8.2.170.0100.01022.96
8.2.160.0100.00322.27
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0030.00626.16
8.2.120.0000.00821.99
8.2.110.0060.01320.52
8.2.100.0030.00917.78
8.2.90.0030.00619.19
8.2.80.0040.00417.97
8.2.70.0040.00417.63
8.2.60.0060.00317.80
8.2.50.0040.00418.07
8.2.40.0040.00418.16
8.2.30.0070.00018.07
8.2.20.0040.00417.74
8.2.10.0040.00419.60
8.2.00.0040.00417.68
8.1.270.0110.00422.14
8.1.260.0040.00426.35
8.1.250.0070.00728.09
8.1.240.0100.00022.13
8.1.230.0000.01122.11
8.1.220.0040.00417.76
8.1.210.0000.00818.77
8.1.200.0100.00017.35
8.1.190.0060.00317.66
8.1.180.0000.00818.10
8.1.170.0030.00518.65
8.1.160.0000.00722.04
8.1.150.0000.00718.65
8.1.140.0040.00417.34
8.1.130.0000.00717.80
8.1.120.0070.00017.51
8.1.110.0000.00817.46
8.1.100.0050.00317.47
8.1.90.0030.00617.50
8.1.80.0000.00717.49
8.1.70.0070.00017.39
8.1.60.0050.00317.54
8.1.50.0030.00517.53
8.1.40.0030.00517.52
8.1.30.0030.00517.70
8.1.20.0060.00317.68
8.1.10.0040.00417.62
8.1.00.0000.00817.35
8.0.300.0030.00318.77
8.0.290.0030.00617.16
8.0.280.0030.00318.46
8.0.270.0000.00817.26
8.0.260.0030.00316.80
8.0.250.0000.00717.05
8.0.240.0040.00316.98
8.0.230.0000.00817.09
8.0.220.0030.00317.02
8.0.210.0030.00717.00
8.0.200.0000.00716.93
8.0.190.0000.00817.00
8.0.180.0000.00716.87
8.0.170.0040.00416.88
8.0.160.0080.00017.00
8.0.150.0000.00716.91
8.0.140.0000.00816.97
8.0.130.0040.00413.39
8.0.120.0040.00416.98
8.0.110.0040.00417.03
8.0.100.0000.00716.76
8.0.90.0080.00016.91
8.0.80.0060.01016.97
8.0.70.0030.00617.02
8.0.60.0070.00016.93
8.0.50.0080.00016.95
8.0.30.0130.00617.11
8.0.20.0110.01117.40
8.0.10.0030.00517.02
8.0.00.0110.01016.71
7.4.330.0060.00015.00
7.4.320.0000.00616.53
7.4.300.0030.00316.51
7.4.290.0080.00016.59
7.4.280.0080.00016.39
7.4.270.0030.00516.44
7.4.260.0030.00616.40
7.4.250.0000.00816.41
7.4.240.0030.00416.44
7.4.230.0070.00016.69
7.4.220.0070.01016.59
7.4.210.0030.01316.53
7.4.200.0030.00316.39
7.4.190.0000.00816.77
7.4.160.0030.01216.64
7.4.150.0090.00917.40
7.4.140.0080.00917.86
7.4.130.0100.00716.61
7.4.120.0090.00916.66
7.4.110.0080.00816.47
7.4.100.0190.00016.71
7.4.90.0140.00516.51
7.4.80.0100.01319.37
7.4.70.0030.01316.59
7.4.60.0040.01216.61
7.4.50.0000.00516.54
7.4.40.0080.00522.77
7.4.30.0030.01316.58
7.4.00.0090.00614.84
7.3.330.0000.00513.40
7.3.320.0000.00513.30
7.3.310.0000.00716.21
7.3.300.0030.00316.44
7.3.290.0030.01316.42
7.3.280.0060.01116.42
7.3.270.0070.01017.40
7.3.260.0090.00916.45
7.3.250.0030.01716.49
7.3.240.0040.01316.51
7.3.230.0070.01016.39
7.3.210.0140.00416.48
7.3.200.0000.01919.39
7.3.190.0100.00716.54
7.3.180.0150.00016.70
7.3.170.0070.01016.68
7.3.160.0100.00616.65
7.3.120.0090.00615.13
7.3.10.0000.01616.67
7.3.00.0110.00416.77
7.2.330.0090.01216.75
7.2.320.0030.01416.80
7.2.310.0150.00616.48
7.2.300.0110.00516.67
7.2.290.0090.00616.59
7.2.130.0070.00716.84
7.2.120.0000.01017.00
7.2.110.0000.01416.83
7.2.100.0060.00916.83
7.2.90.0000.01017.02
7.2.80.0040.00816.89
7.2.70.0000.01316.82
7.2.60.0050.00816.98
7.2.50.0030.00617.02
7.2.40.0040.01216.96
7.2.30.0060.00617.09
7.2.20.0040.00816.80
7.2.10.0030.01116.70
7.2.00.0030.00818.11
7.1.250.0040.01115.69
7.1.200.0030.01015.79
7.1.100.0180.00317.94
7.1.70.0070.00517.06
7.1.60.0060.01619.29
7.1.50.0070.01816.87
7.1.00.0030.07722.33
7.0.200.0230.00314.87
7.0.140.0070.06721.95
7.0.100.0100.06320.20
7.0.90.0170.08320.03
7.0.80.0130.08319.96
7.0.70.0230.07019.96
7.0.60.0030.04719.97
7.0.50.0030.05020.39
7.0.40.0000.04720.13
7.0.30.0000.04320.11
7.0.20.0130.04020.14
7.0.10.0030.04020.12
7.0.00.0100.03320.16
5.6.280.0000.07320.82
5.6.250.0100.08020.77
5.6.240.0070.08020.70
5.6.230.0100.08020.72
5.6.220.0030.05020.65
5.6.210.0030.04320.65
5.6.200.0100.08021.04
5.6.190.0030.04720.94
5.6.180.0070.07721.18
5.6.170.0030.04321.18
5.6.160.0030.04320.96
5.6.150.0100.04021.08
5.6.140.0030.04321.02
5.6.130.0030.03321.04
5.6.120.0030.04020.91
5.6.110.0130.03021.02
5.6.100.0100.03721.00
5.6.90.0070.04021.06
5.6.80.0070.04720.49
5.6.70.0030.04020.43
5.6.60.0100.04720.55
5.6.50.0200.06320.41
5.6.40.0070.08020.43
5.6.30.0130.07720.47
5.6.20.0070.08020.46
5.6.10.0100.07320.38
5.6.00.0130.07320.45
5.5.380.0070.08320.46
5.5.370.0130.08320.55
5.5.360.0130.07320.55
5.5.350.0100.07020.40
5.5.340.0100.05320.83
5.5.330.0030.04320.87
5.5.320.0070.03720.64
5.5.310.0070.04020.91
5.5.300.0130.03020.76
5.5.290.0100.03320.86
5.5.280.0100.03720.86
5.5.270.0030.04720.88
5.5.260.0000.04720.85
5.5.250.0030.04320.70
5.5.240.0070.06020.11
5.5.230.0100.06320.11
5.5.220.0000.08320.25
5.5.210.0100.07720.27
5.5.200.0200.06720.13
5.5.190.0030.07720.15
5.5.180.0030.08020.11
5.5.160.0170.06320.28
5.5.150.0100.08020.13
5.5.140.0100.07720.14
5.5.130.0230.06020.08
5.5.120.0130.07320.11
5.5.110.0100.07720.10
5.5.100.0100.07320.16
5.5.90.0130.07720.01
5.5.80.0030.08020.16
5.5.70.0130.07720.05
5.5.60.0030.08320.10
5.5.50.0130.07720.06
5.5.40.0000.08020.14
5.5.30.0070.07320.08
5.5.20.0170.07020.10
5.5.10.0100.07720.09
5.5.00.0030.07319.97
5.4.450.0000.04319.50
5.4.440.0070.05319.40
5.4.430.0070.03719.50
5.4.420.0000.04319.36
5.4.410.0030.03719.38
5.4.400.0100.06719.05
5.4.390.0070.03319.23
5.4.380.0000.08319.04
5.4.370.0100.07019.05
5.4.360.0100.07718.95
5.4.350.0170.06319.07
5.4.340.0030.08318.88
5.4.320.0130.07018.90
5.4.310.0130.06719.22
5.4.300.0100.06719.05
5.4.290.0070.08019.18
5.4.280.0070.04018.94
5.4.270.0070.05319.12
5.4.260.0030.08019.04
5.4.250.0070.05319.08
5.4.240.0130.06719.12
5.4.230.0130.07019.22
5.4.220.0100.07018.89
5.4.210.0130.03718.87
5.4.200.0030.08019.02
5.4.190.0030.08019.11
5.4.180.0070.05019.03
5.4.170.0030.07719.03
5.4.160.0030.04719.21
5.4.150.0000.04719.03
5.4.140.0030.08016.25
5.4.130.0030.07716.41
5.4.120.0100.07016.19
5.4.110.0130.07316.39
5.4.100.0070.06316.47
5.4.90.0170.06316.47
5.4.80.0000.05016.25
5.4.70.0000.06316.48
5.4.60.0130.06316.39
5.4.50.0130.04016.47
5.4.40.0000.04716.30
5.4.30.0070.07316.24
5.4.20.0100.07316.47
5.4.10.0030.04716.40
5.4.00.0100.06315.87
5.3.290.0100.04714.79
5.3.280.0100.07714.70
5.3.270.0130.07014.57
5.3.260.0100.07314.53
5.3.250.0100.05714.56
5.3.240.0000.07014.54
5.3.230.0030.06714.59
5.3.220.0070.06714.64
5.3.210.0070.07314.66
5.3.200.0100.06714.71
5.3.190.0030.05014.50
5.3.180.0130.07314.60
5.3.170.0100.07014.49
5.3.160.0070.06014.60
5.3.150.0070.06314.50
5.3.140.0030.04314.53
5.3.130.0130.07014.57
5.3.120.0030.07314.66
5.3.110.0070.08014.48
5.3.100.0170.06314.03
5.3.90.0070.04714.16
5.3.80.0130.06714.07
5.3.70.0000.07313.92
5.3.60.0130.06714.07
5.3.50.0070.07313.86
5.3.40.0030.06314.05
5.3.30.0130.06713.92
5.3.20.0030.04713.68
5.3.10.0070.07713.69
5.3.00.0030.06013.67
5.2.170.0130.05313.64
5.2.160.0070.06013.64
5.2.150.0070.03313.64
5.2.140.0030.06713.64
5.2.130.0030.06013.64
5.2.120.0030.04013.64
5.2.110.0000.06713.64
5.2.100.0100.03013.64
5.2.90.0070.06013.64
5.2.80.0030.06313.64
5.2.70.0100.04713.64
5.2.60.0100.05313.64
5.2.50.0100.05313.64
5.2.40.0000.06313.64
5.2.30.0070.05313.64
5.2.20.0130.05313.64
5.2.10.0100.05313.64
5.2.00.0070.05713.64
5.1.60.0100.04313.64
5.1.50.0100.04313.64
5.1.40.0070.03013.64
5.1.30.0030.05713.64
5.1.20.0030.05713.64
5.1.10.0100.04313.64
5.1.00.0030.04713.64
5.0.50.0070.04313.64
5.0.40.0070.03713.64
5.0.30.0070.05013.64
5.0.20.0030.02313.64
5.0.10.0100.02713.64
5.0.00.0000.05713.64
4.4.90.0000.02313.64
4.4.80.0000.03713.64
4.4.70.0000.03713.64
4.4.60.0000.03713.64
4.4.50.0070.02713.64
4.4.40.0000.02313.64
4.4.30.0000.04013.64
4.4.20.0000.03013.64
4.4.10.0030.03313.64
4.4.00.0030.05013.64
4.3.110.0030.03313.64
4.3.100.0000.03313.64
4.3.90.0030.03013.64
4.3.80.0000.02713.64
4.3.70.0030.03313.64
4.3.60.0000.01713.64
4.3.50.0070.01313.64
4.3.40.0030.03713.64
4.3.30.0000.03013.64
4.3.20.0000.01713.64
4.3.10.0030.03013.64
4.3.00.0030.02013.64

preferences:
37.4 ms | 400 KiB | 5 Q