3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( 'Bob' => 2, 'Theresa' => 3, 'The farm house' => 2, 'Bob at the farm house' => 1, ); $result = $array; $removed = &$result; foreach($removed as $key => $value) { foreach($removed as $test => $value) { if (false !== stripos($test, $key)) { unset($removed[$key]); } } } print_r($result);

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.0120.00918.55
8.3.50.0210.01022.10
8.3.40.0100.01018.89
8.3.30.0070.00718.90
8.3.20.0050.00220.33
8.3.10.0070.00021.92
8.3.00.0080.00022.47
8.2.180.0100.01016.50
8.2.170.0110.00422.96
8.2.160.0140.00721.08
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00417.50
8.2.110.0060.00321.00
8.2.100.0120.00017.97
8.2.90.0000.00819.17
8.2.80.0030.00617.97
8.2.70.0030.00617.63
8.2.60.0040.00418.05
8.2.50.0000.00818.16
8.2.40.0000.00720.47
8.2.30.0040.00419.17
8.2.20.0040.00417.59
8.2.10.0050.00217.80
8.2.00.0040.00417.62
8.1.280.0070.00725.92
8.1.270.0000.00822.05
8.1.260.0030.00726.35
8.1.250.0040.00428.09
8.1.240.0060.00322.14
8.1.230.0000.01217.77
8.1.220.0100.00017.79
8.1.210.0000.00818.77
8.1.200.0060.00317.22
8.1.190.0000.00917.35
8.1.180.0040.00418.10
8.1.170.0030.00618.53
8.1.160.0040.00418.95
8.1.150.0040.00418.63
8.1.140.0040.00417.47
8.1.130.0070.00017.75
8.1.120.0040.00417.44
8.1.110.0070.00017.33
8.1.100.0000.00717.34
8.1.90.0040.00417.43
8.1.80.0000.00817.51
8.1.70.0030.00317.44
8.1.60.0040.00417.55
8.1.50.0030.00617.57
8.1.40.0000.00817.41
8.1.30.0000.00817.66
8.1.20.0000.00817.61
8.1.10.0000.00717.36
8.1.00.0030.00617.45
8.0.300.0000.00818.77
8.0.290.0030.00616.75
8.0.280.0040.00418.45
8.0.270.0030.00317.13
8.0.260.0000.00716.80
8.0.250.0030.00316.98
8.0.240.0000.00816.98
8.0.230.0040.00416.96
8.0.220.0040.00416.95
8.0.210.0040.00416.73
8.0.200.0000.00617.04
8.0.190.0000.00816.96
8.0.180.0050.00316.95
8.0.170.0040.00416.97
8.0.160.0070.00016.88
8.0.150.0030.00316.92
8.0.140.0000.00816.76
8.0.130.0060.00013.33
8.0.120.0040.00416.78
8.0.110.0040.00416.80
8.0.100.0040.00416.73
8.0.90.0070.00016.79
8.0.80.0150.00916.95
8.0.70.0000.00716.81
8.0.60.0000.00716.69
8.0.50.0070.00016.76
8.0.30.0100.00716.84
8.0.20.0090.00917.40
8.0.10.0040.00416.95
8.0.00.0110.00816.79
7.4.330.0000.00515.00
7.4.320.0030.00316.51
7.4.300.0020.00516.49
7.4.290.0000.00916.61
7.4.280.0000.00716.43
7.4.270.0000.00716.50
7.4.260.0070.00016.35
7.4.250.0000.00716.46
7.4.240.0020.00516.57
7.4.230.0070.00016.58
7.4.220.0040.01616.43
7.4.210.0100.00716.62
7.4.200.0040.00416.69
7.4.190.0040.00416.36
7.4.160.0140.00716.61
7.4.150.0100.00717.40
7.4.140.0100.00717.86
7.4.130.0090.00716.63
7.4.120.0080.01016.65
7.4.110.0150.01216.52
7.4.100.0110.00716.29
7.4.90.0130.00416.40
7.4.80.0060.01319.39
7.4.70.0070.01416.47
7.4.60.0040.01416.55
7.4.50.0000.00816.40
7.4.40.0030.01622.77
7.4.30.0080.00816.65
7.4.00.0080.00814.88
7.3.330.0000.00513.22
7.3.320.0000.00513.27
7.3.310.0000.00616.30
7.3.300.0030.00316.23
7.3.290.0070.00716.31
7.3.280.0100.00816.36
7.3.270.0090.00917.40
7.3.260.0110.00616.34
7.3.250.0120.00516.28
7.3.240.0080.00816.38
7.3.230.0080.00816.42
7.3.210.0040.01616.55
7.3.200.0100.01019.39
7.3.190.0060.00916.56
7.3.180.0000.01416.42
7.3.170.0100.00716.57
7.3.160.0030.01416.32
7.3.120.0070.00314.81
7.2.330.0060.01216.65
7.2.320.0060.01216.42
7.2.310.0120.00616.71
7.2.300.0110.01116.79
7.2.290.0000.01616.49
7.2.00.0040.01119.09
7.1.100.0510.01315.59
7.1.70.0000.00917.04
7.1.60.0160.00619.82
7.1.50.0110.00016.89
7.1.00.0070.07322.50
7.0.200.0040.00416.94
7.0.140.0070.07022.12
7.0.60.0070.08021.84
7.0.50.0170.07317.82
7.0.40.0370.04320.05
7.0.30.0170.06720.04
7.0.20.0370.07320.20
7.0.10.0100.09020.33
7.0.00.0100.04020.18
5.6.280.0100.06720.81
5.6.210.0100.05320.70
5.6.200.0030.04018.13
5.6.190.0070.05020.41
5.6.180.0400.06720.39
5.6.170.0300.05020.54
5.6.160.0030.07020.54
5.6.150.0130.07318.22
5.6.140.0130.04318.21
5.6.130.0070.05318.11
5.6.120.0130.06321.02
5.6.110.0030.07021.09
5.6.100.0100.05721.02
5.6.90.0070.04021.00
5.6.80.0030.05720.50
5.5.350.4100.04320.32
5.5.340.0130.07017.86
5.5.330.0070.04720.19
5.5.320.0330.08020.46
5.5.310.0230.07320.27
5.5.300.0100.05317.94
5.5.290.0200.05317.99
5.5.280.0100.06320.77
5.5.270.0070.04020.85
5.5.260.0130.07720.76
5.5.250.0070.04020.61
5.5.240.3930.03720.18
5.4.450.3900.03319.20
5.4.440.0030.04719.58
5.4.430.4470.03719.49
5.4.420.4070.04319.52
5.4.410.4200.03719.39
5.4.400.4570.04019.13
5.4.390.4100.04319.16
5.4.380.3570.03718.89
5.4.370.3900.03719.00
5.4.360.3900.03319.20
5.4.350.3630.04018.88
5.4.340.3630.03718.87
5.4.320.3770.04019.18
5.4.310.3370.03719.08
5.4.300.3630.03318.86
5.4.290.3870.03719.00
5.4.280.3900.03719.20
5.4.270.5630.03019.17
5.4.260.4770.03318.87
5.4.250.4630.03319.18
5.4.240.3670.04018.99
5.4.230.3630.04019.15
5.4.220.3900.03719.12
5.4.210.3630.03318.88
5.4.200.3070.03019.06
5.4.190.4630.04019.07
5.4.180.4400.03719.15
5.4.170.4330.03319.15
5.4.160.4170.03718.85
5.4.150.4300.04319.02
5.4.140.3670.03316.33
5.4.130.4130.04016.34
5.4.120.3800.04016.34
5.4.110.4070.04716.57
5.4.100.3330.03016.48
5.4.90.3670.03316.13
5.4.80.3900.04016.40
5.4.70.3730.03016.21
5.4.60.4370.02716.43
5.4.50.3900.04316.44
5.4.40.3800.03716.52
5.4.30.3500.04016.32
5.4.20.3730.03316.44
5.4.10.5070.03016.39
5.4.00.5030.03315.73
5.3.290.3800.04014.68
5.3.280.3670.03014.52
5.3.270.4400.03714.55
5.3.260.4630.04014.58
5.3.250.3600.04014.53
5.3.240.3730.03714.54
5.3.230.3500.04314.56
5.3.220.3530.04014.39
5.3.210.3700.03714.48
5.3.200.3700.03314.50
5.3.190.3600.04014.44
5.3.180.3530.03314.53
5.3.170.3700.03714.59
5.3.160.3630.03014.49
5.3.150.4600.03014.51
5.3.140.3800.03014.45
5.3.130.3630.03314.47
5.3.120.3800.03714.45
5.3.110.3900.03314.52
5.3.100.4630.04013.99
5.3.90.4600.03014.05
5.3.80.4470.03714.00
5.3.70.4530.02713.84
5.3.60.4400.03313.93
5.3.50.4700.04013.88
5.3.40.4400.03713.89
5.3.30.4700.04313.85
5.3.20.3900.03313.52
5.3.10.4130.05013.47
5.3.00.4070.03013.57
5.2.170.3570.03011.03
5.2.160.4130.03011.08
5.2.150.3700.03311.11
5.2.140.3700.03011.30
5.2.130.3370.02711.04
5.2.120.4200.03311.09
5.2.110.3130.02711.02
5.2.100.3270.03311.26
5.2.90.3200.03011.00
5.2.80.3900.03010.99
5.2.70.3900.03310.93
5.2.60.3970.02710.94
5.2.50.3970.02711.02
5.2.40.3230.03011.16
5.2.30.3230.03010.87
5.2.20.2400.03010.96
5.2.10.2670.02710.90
5.2.00.2630.02710.67
5.1.60.2770.0279.99
5.1.50.2370.0239.98
5.1.40.2370.0279.96
5.1.30.2430.02010.48
5.1.20.2530.02710.49
5.1.10.2630.0309.97
5.1.00.2630.02710.13
5.0.50.1300.0238.50
5.0.40.1400.0208.40
5.0.30.1170.0308.23
5.0.20.1630.0208.18
5.0.10.1600.0178.32
5.0.00.1870.0308.07
4.4.90.1730.0176.12
4.4.80.1830.0136.12
4.4.70.1570.0206.12
4.4.60.1470.0136.12
4.4.50.1530.0136.12
4.4.40.1270.0236.12
4.4.30.1200.0136.12
4.4.20.1630.0176.12
4.4.10.1630.0136.12
4.4.00.1570.0276.12
4.3.110.1170.0176.12
4.3.100.1500.0136.12
4.3.90.1730.0136.12
4.3.80.1430.0236.12
4.3.70.1430.0136.12
4.3.60.1470.0176.12
4.3.50.1500.0106.12
4.3.40.1430.0236.12
4.3.30.0730.0176.12
4.3.20.0970.0176.12
4.3.10.0970.0236.12
4.3.00.1070.0206.12

preferences:
43.83 ms | 401 KiB | 5 Q