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_merge(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.0110.00418.76
8.3.30.0110.00419.08
8.3.20.0040.00420.33
8.3.10.0080.00023.66
8.3.00.0080.00022.49
8.2.170.0030.01722.96
8.2.160.0070.01022.18
8.2.150.0040.00424.18
8.2.140.0030.00524.66
8.2.130.0070.00026.16
8.2.120.0040.00422.13
8.2.110.0060.00321.98
8.2.100.0000.01317.78
8.2.90.0000.00819.22
8.2.80.0030.00518.16
8.2.70.0040.00417.63
8.2.60.0000.00817.93
8.2.50.0000.00818.07
8.2.40.0050.00318.34
8.2.30.0070.00018.13
8.2.20.0050.00217.73
8.2.10.0040.00417.74
8.2.00.0000.00817.68
8.1.270.0030.00623.96
8.1.260.0130.00626.35
8.1.250.0070.00028.09
8.1.240.0080.00023.83
8.1.230.0120.00019.01
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0100.00017.35
8.1.190.0040.00417.51
8.1.180.0000.00818.10
8.1.170.0030.00618.41
8.1.160.0030.00622.02
8.1.150.0040.00418.55
8.1.140.0070.00017.49
8.1.130.0030.00317.84
8.1.120.0000.00817.54
8.1.110.0040.00417.40
8.1.100.0030.00317.50
8.1.90.0070.00317.37
8.1.80.0070.00017.30
8.1.70.0050.00217.30
8.1.60.0030.00517.58
8.1.50.0050.00317.54
8.1.40.0050.00217.41
8.1.30.0040.00417.59
8.1.20.0000.00817.65
8.1.10.0000.00717.51
8.1.00.0060.00317.48
8.0.300.0040.00418.77
8.0.290.0070.00017.16
8.0.280.0050.00318.38
8.0.270.0080.00017.30
8.0.260.0070.00016.89
8.0.250.0040.00416.89
8.0.240.0000.00817.00
8.0.230.0070.00016.95
8.0.220.0040.00416.94
8.0.210.0080.00016.91
8.0.200.0060.00016.96
8.0.190.0040.00416.90
8.0.180.0040.00416.81
8.0.170.0040.00416.81
8.0.160.0040.00416.93
8.0.150.0030.00316.86
8.0.140.0040.00416.79
8.0.130.0060.00013.36
8.0.120.0040.00416.89
8.0.110.0070.00016.79
8.0.100.0070.00016.92
8.0.90.0040.00416.93
8.0.80.0110.00416.78
8.0.70.0040.00416.91
8.0.60.0030.00616.93
8.0.50.0070.00016.71
8.0.30.0200.00517.15
8.0.20.0120.00817.40
8.0.10.0040.00416.91
8.0.00.0120.00616.61
7.4.330.0020.00215.00
7.4.320.0060.00016.61
7.4.300.0000.00616.44
7.4.290.0040.00416.55
7.4.280.0040.00416.61
7.4.270.0060.00616.52
7.4.260.0040.00416.51
7.4.250.0000.00716.46
7.4.240.0020.00516.50
7.4.230.0040.00416.58
7.4.220.0070.01716.59
7.4.210.0110.00316.56
7.4.200.0000.00716.30
7.4.190.0040.00416.33
7.4.160.0100.00516.34
7.4.150.0130.01317.40
7.4.140.0120.00717.86
7.4.130.0090.00916.61
7.4.120.0110.00716.51
7.4.110.0030.01316.62
7.4.100.0130.00716.50
7.4.90.0030.01416.64
7.4.80.0140.00319.39
7.4.70.0000.01716.53
7.4.60.0080.00816.52
7.4.50.0120.00016.23
7.4.40.0110.00622.77
7.4.30.0030.01316.50
7.4.10.0070.01314.91
7.4.00.0060.00914.89
7.3.330.0060.00013.44
7.3.320.0050.00013.32
7.3.310.0030.00516.32
7.3.300.0000.00716.41
7.3.290.0110.00316.37
7.3.280.0090.00816.36
7.3.270.0120.00917.40
7.3.260.0100.01316.59
7.3.250.0080.01216.51
7.3.240.0140.00316.65
7.3.230.0090.00916.42
7.3.210.0110.00716.32
7.3.200.0070.01319.39
7.3.190.0060.00616.60
7.3.180.0060.01016.37
7.3.170.0100.00616.43
7.3.160.0060.01016.25
7.3.130.0070.01115.03
7.3.120.0080.01114.94
7.3.110.0130.00714.84
7.3.100.0060.00915.05
7.3.90.0070.00914.65
7.3.80.0010.01114.81
7.3.70.0020.01114.84
7.3.60.0090.00514.61
7.3.50.0070.00715.01
7.3.40.0080.00314.59
7.3.30.0050.00514.80
7.3.20.0080.00616.71
7.3.10.0080.00816.45
7.3.00.0050.00616.77
7.2.330.0140.00316.72
7.2.320.0150.00316.64
7.2.310.0130.00416.46
7.2.300.0030.01316.64
7.2.290.0070.01016.69
7.2.260.0100.01014.94
7.2.250.0090.00714.94
7.2.240.0070.00715.05
7.2.230.0100.00715.15
7.2.220.0050.01315.06
7.2.210.0040.01114.84
7.2.200.0080.00614.96
7.2.190.0050.00715.13
7.2.180.0030.00915.14
7.2.170.0040.00515.10
7.2.160.0070.00714.89
7.2.150.0110.00416.88
7.2.140.0000.01017.00
7.2.130.0050.00516.75
7.2.120.0090.00316.99
7.2.110.0050.00516.96
7.2.100.0060.00617.08
7.2.90.0060.01217.10
7.2.80.0060.00617.02
7.2.70.0070.00716.80
7.2.60.0000.01117.01
7.2.50.0040.01517.01
7.2.40.0100.00716.99
7.2.30.0080.00817.06
7.2.20.0030.01016.96
7.2.10.0110.00416.81
7.2.00.0050.00818.27
7.1.330.0110.00415.82
7.1.320.0090.00615.81
7.1.310.0050.00715.67
7.1.300.0090.00315.81
7.1.290.0050.00715.83
7.1.280.0030.01115.73
7.1.270.0030.00815.93
7.1.260.0050.00715.71
7.1.250.0070.00715.80
7.1.240.0110.00315.84
7.1.230.0000.01616.05
7.1.220.0060.00615.57
7.1.210.0030.01315.82
7.1.200.0030.00715.58
7.1.190.0110.00415.77
7.1.180.0100.00315.63
7.1.170.0080.00615.68
7.1.160.0000.01515.97
7.1.150.0030.00916.02
7.1.140.0030.00915.90
7.1.130.0070.00715.88
7.1.120.0030.00615.91
7.1.110.0090.00615.61
7.1.100.0050.01017.01
7.1.90.0060.00615.75
7.1.80.0070.00715.76
7.1.70.0080.00316.56
7.1.60.0070.01217.67
7.1.50.0110.00816.37
7.1.40.0030.01015.96
7.1.30.0110.00415.77
7.1.20.0060.00915.64
7.1.10.0100.00315.70
7.1.00.0060.03818.92
7.0.330.0030.00715.49
7.0.320.0090.00615.46
7.0.310.0030.00815.43
7.0.300.0100.00315.36
7.0.290.0080.00315.42
7.0.280.0070.00315.31
7.0.270.0000.01015.54
7.0.260.0120.00315.57
7.0.250.0090.00015.55
7.0.240.0040.01115.64
7.0.230.0030.00515.62
7.0.220.0000.01015.39
7.0.210.0030.00915.46
7.0.200.0040.00515.98
7.0.190.0000.00815.48
7.0.180.0070.00715.21
7.0.170.0070.00715.34
7.0.160.0070.01015.35
7.0.150.0090.00315.33
7.0.140.0100.03518.71
7.0.130.0090.00615.66
7.0.120.0030.00715.36
7.0.110.0000.00915.59
7.0.100.0050.02517.76
7.0.90.0100.03717.65
7.0.80.0090.02917.67
7.0.70.0190.03217.73
7.0.60.0120.02817.75
7.0.50.0090.01717.91
7.0.40.0030.03916.89
7.0.30.0100.04016.85
7.0.20.0090.02716.79
7.0.10.0050.02416.86
7.0.00.0050.03416.83
5.6.400.0000.01014.52
5.6.390.0030.01014.35
5.6.380.0030.01014.19
5.6.370.0040.00814.24
5.6.360.0030.01014.11
5.6.350.0030.00714.63
5.6.340.0030.01013.96
5.6.330.0110.00313.82
5.6.320.0070.00714.34
5.6.310.0090.00614.26
5.6.300.0070.00714.01
5.6.290.0000.01514.52
5.6.280.0080.03317.69
5.6.270.0060.00314.25
5.6.260.0000.01414.42
5.6.250.0050.02517.54
5.6.240.0030.03617.39
5.6.230.0030.02517.49
5.6.220.0070.02417.44
5.6.210.0110.03717.63
5.6.200.0030.02717.66
5.6.190.0060.02817.58
5.6.180.0030.02517.61
5.6.170.0140.03317.71
5.6.160.0110.04017.62
5.6.150.0100.02817.61
5.6.140.0050.04217.72
5.6.130.0120.03817.65
5.6.120.0030.04717.59
5.6.110.0080.03717.54
5.6.100.0050.04217.70
5.6.90.0050.03217.64
5.6.80.0050.03417.17
5.6.70.0140.03717.45
5.6.60.0020.04317.42
5.6.50.0080.03317.19
5.6.40.0050.04417.18
5.6.30.0070.04017.37
5.6.20.0050.02317.19
5.6.10.0060.02117.33
5.6.00.0070.02717.48
5.5.380.0100.03917.28
5.5.370.0060.02517.28
5.5.360.0050.02917.27
5.5.350.0090.02617.18
5.5.340.0050.04617.46
5.5.330.0050.04317.47
5.5.320.0090.04317.55
5.5.310.0050.02517.34
5.5.300.0010.04817.47
5.5.290.0060.04517.31
5.5.280.0040.04217.66
5.5.270.0090.04017.37
5.5.260.0080.02317.29
5.5.250.0120.03417.28
5.5.240.0030.03017.12
5.5.230.0040.03917.19
5.5.220.0050.02916.99
5.5.210.0030.04416.97
5.5.200.0060.02417.08
5.5.190.0030.04817.32
5.5.180.0080.02917.16
5.5.170.0030.00814.10
5.5.160.0100.03017.08
5.5.150.0120.01817.08
5.5.140.0070.03317.17
5.5.130.0060.02517.06
5.5.120.0100.03817.17
5.5.110.0050.04517.08
5.5.100.0050.02117.05
5.5.90.0030.04517.10
5.5.80.0030.03017.06
5.5.70.0050.02617.06
5.5.60.0060.02317.04
5.5.50.0050.02316.93
5.5.40.0070.02217.08
5.5.30.0040.02517.01
5.5.20.0090.03217.01
5.5.10.0050.02516.79
5.5.00.0080.03616.99
5.4.450.0030.02316.43
5.4.440.0030.03116.49
5.4.430.0060.02616.41
5.4.420.0020.02216.45
5.4.410.0030.04116.47
5.4.400.0040.02416.34
5.4.390.0030.02216.34
5.4.380.0080.02816.35
5.4.370.0000.02616.43
5.4.360.0030.03516.33
5.4.350.0060.02716.34
5.4.340.0080.01816.27
5.4.330.0100.00313.63
5.4.320.0040.02016.38
5.4.310.0090.04016.38
5.4.300.0050.04216.39
5.4.290.0020.03516.26
5.4.280.0030.04116.36
5.4.270.0050.02016.33
5.4.260.0060.03816.42
5.4.250.0050.04116.33
5.4.240.0070.01816.34
5.4.230.0070.02216.38
5.4.220.0020.04816.29
5.4.210.0080.03316.33
5.4.200.0020.02916.43
5.4.190.0060.04316.36
5.4.180.0090.02816.38
5.4.170.0060.01816.36
5.4.160.0030.03016.39
5.4.150.0030.04116.32
5.4.140.0030.02514.91
5.4.130.0020.04115.04
5.4.120.0000.02415.02
5.4.110.0030.02014.95
5.4.100.0050.04115.05
5.4.90.0080.03815.05
5.4.80.0070.01814.97
5.4.70.0070.03315.06
5.4.60.0030.03714.97
5.4.50.0110.03115.02
5.4.40.0040.02915.08
5.4.30.0050.02315.05
5.4.20.0080.03315.00
5.4.10.0050.03815.06
5.4.00.0050.04214.70
5.3.290.0090.03214.16
5.3.280.0030.01914.17
5.3.270.0100.03814.10
5.3.260.0050.04114.18
5.3.250.0050.03914.15
5.3.240.0040.02014.11
5.3.230.0100.03714.12
5.3.220.0030.01914.13
5.3.210.0030.02114.13
5.3.200.0030.02314.10
5.3.190.0070.03514.16
5.3.180.0060.02114.17
5.3.170.0100.02614.14
5.3.160.0050.03814.06
5.3.150.0060.04114.17
5.3.140.0080.03714.09
5.3.130.0030.03014.10
5.3.120.0030.03014.09
5.3.110.0000.03014.14
5.3.100.0030.03213.84
5.3.90.0080.03813.90
5.3.80.0060.03013.83
5.3.70.0040.02613.83
5.3.60.0100.01813.86
5.3.50.0050.02413.82
5.3.40.0080.03513.81
5.3.30.0030.02313.84
5.3.20.0030.02613.63
5.3.10.0080.03813.70
5.3.00.0100.03013.63
5.2.170.0070.04711.24
5.2.160.0070.02711.25
5.2.150.0030.05711.00
5.2.140.0130.04011.15
5.2.130.0100.04711.11
5.2.120.0130.05311.03
5.2.110.0130.03311.10
5.2.100.0000.04010.98
5.2.90.0070.03311.00
5.2.80.0070.06311.11
5.2.70.0030.05710.95
5.2.60.0070.04311.15
5.2.50.0070.04711.11
5.2.40.0070.05711.06
5.2.30.0030.05710.83
5.2.20.0070.04311.06
5.2.10.0030.05310.79
5.2.00.0030.06010.57
5.1.60.0030.0509.98
5.1.50.0000.03010.05
5.1.40.0070.0209.98
5.1.30.0000.03310.26
5.1.20.0000.05010.34
5.1.10.0000.02710.12
5.1.00.0030.02310.05
5.0.50.0000.0278.55
5.0.40.0070.0238.53
5.0.30.0000.0338.53
5.0.20.0000.0208.53
5.0.10.0070.0208.53
5.0.00.0030.0308.53
4.4.90.0000.0338.53
4.4.80.0000.0378.53
4.4.70.0000.0208.53
4.4.60.0070.0338.53
4.4.50.0000.0178.53
4.4.40.0030.0278.53
4.4.30.0000.0178.53
4.4.20.0000.0178.53
4.4.10.0000.0278.53
4.4.00.0000.0578.53
4.3.110.0000.0208.53
4.3.100.0030.0238.53
4.3.90.0000.0178.53
4.3.80.0100.0438.53
4.3.70.0000.0178.53
4.3.60.0000.0178.53
4.3.50.0030.0338.53
4.3.40.0030.0238.53
4.3.30.0070.0108.53
4.3.20.0000.0178.53
4.3.10.0000.0178.53
4.3.00.0000.0138.53

preferences:
48.3 ms | 400 KiB | 5 Q