3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = Array ( '3' => 10, '2' => 2, '5' => 'Nakiya', ); /** * Removes a particular value from an array * * @param string $array * @param string $value * * @return array */ function removearrayValue($array, $value) { $IsNumericArray = true; foreach ($array as $key => $item) { if ($item === $value) { if (!is_int($key)) { $IsNumericArray = false; } unset($array[$key]); } } if ($IsNumericArray) { $array = array_values($array); } return $array; } var_dump(removearrayValue($array,'Nakiya'));

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.4.30.0120.00618.61
8.4.20.0030.01718.71
8.4.10.0030.00517.87
8.3.160.0060.01317.32
8.3.150.0040.01817.41
8.3.140.0040.00416.66
8.3.130.0150.00018.32
8.3.120.0040.00418.82
8.3.110.0070.01320.94
8.3.100.0120.00318.43
8.3.90.0040.00416.63
8.3.80.0060.00318.43
8.3.70.0110.00418.43
8.3.60.0040.01116.61
8.3.50.0090.00719.22
8.3.40.0130.00318.43
8.3.30.0070.00718.74
8.3.20.0080.00020.79
8.3.10.0080.00021.96
8.3.00.0130.00320.56
8.2.270.0110.00817.23
8.2.260.0040.01416.46
8.2.250.0080.00818.86
8.2.240.0140.00717.39
8.2.230.0080.00022.58
8.2.220.0060.00324.06
8.2.210.0090.00026.77
8.2.200.0000.00916.38
8.2.190.0070.00716.75
8.2.180.0120.00318.39
8.2.170.0110.00422.96
8.2.160.0140.00422.08
8.2.150.0080.00025.66
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00419.77
8.2.110.0100.00021.05
8.2.100.0030.01019.70
8.2.90.0000.01017.75
8.2.80.0000.00817.97
8.2.70.0040.00417.93
8.2.60.0040.00418.09
8.2.50.0050.00318.10
8.2.40.0040.00419.51
8.2.30.0080.00019.38
8.2.20.0000.00818.13
8.2.10.0000.00719.37
8.2.00.0040.00419.24
8.1.310.0060.01216.88
8.1.300.0060.01218.15
8.1.290.0060.00318.88
8.1.280.0180.00025.92
8.1.270.0000.00822.65
8.1.260.0000.00826.35
8.1.250.0070.00028.09
8.1.240.0060.00322.10
8.1.230.0040.00819.05
8.1.220.0040.00417.77
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0040.00417.35
8.1.180.0060.00618.10
8.1.170.0000.00720.89
8.1.160.0000.00720.79
8.1.150.0050.00318.86
8.1.140.0040.00420.19
8.1.130.0050.00220.19
8.1.120.0040.00417.47
8.1.110.0030.00517.48
8.1.100.0000.00717.47
8.1.90.0040.00417.37
8.1.80.0090.00017.31
8.1.70.0000.00717.34
8.1.60.0040.00417.57
8.1.50.0000.00817.49
8.1.40.0000.00917.53
8.1.30.0000.00917.75
8.1.20.0030.00517.50
8.1.10.0040.00417.48
8.1.00.0000.00817.32
8.0.300.0000.00719.65
8.0.290.0030.00716.75
8.0.280.0000.00718.50
8.0.270.0040.00416.82
8.0.260.0000.00620.13
8.0.250.0030.00317.01
8.0.240.0040.00716.87
8.0.230.0000.00716.95
8.0.220.0070.00016.84
8.0.210.0000.00816.89
8.0.200.0070.00016.91
8.0.190.0040.00716.94
8.0.180.0030.00616.97
8.0.170.0050.00316.80
8.0.160.0030.00317.01
8.0.150.0040.00416.83
8.0.140.0040.00416.83
8.0.130.0050.00013.24
8.0.120.0000.00916.90
8.0.110.0040.00416.89
8.0.100.0020.00516.74
8.0.90.0000.00916.94
8.0.80.0130.00516.87
8.0.70.0000.00816.89
8.0.60.0000.00816.91
8.0.50.0040.00416.89
8.0.30.0150.00317.06
8.0.20.0100.00916.96
8.0.10.0040.00417.05
8.0.00.0180.00616.61
7.4.330.0000.00415.55
7.4.320.0030.00316.53
7.4.300.0060.00016.49
7.4.290.0090.00316.54
7.4.280.0000.00816.39
7.4.270.0030.00316.61
7.4.260.0050.00013.29
7.4.250.0040.00416.43
7.4.240.0040.00416.58
7.4.230.0000.00716.40
7.4.220.0020.00516.56
7.4.210.0070.00816.63
7.4.200.0050.00216.42
7.4.130.0090.00916.45
7.4.120.0060.01216.49
7.4.110.0040.01416.43
7.4.100.0190.00316.65
7.4.90.0120.00616.57
7.4.80.0140.00319.39
7.4.70.0030.01316.55
7.4.60.0100.00716.54
7.4.50.0110.00716.62
7.4.40.0150.00616.53
7.4.00.0000.01614.90
7.3.330.0070.00016.39
7.3.320.0000.00513.23
7.3.310.0030.00316.34
7.3.300.0020.00516.23
7.3.290.0120.00816.35
7.3.260.0110.00916.43
7.3.240.0070.01216.52
7.3.230.0070.01016.43
7.3.210.0130.00316.40
7.3.200.0080.00916.67
7.3.190.0160.00616.43
7.3.180.0070.01416.23
7.3.170.0080.00816.68
7.3.160.0110.01016.57
7.3.120.0060.00914.81
7.3.110.0090.00414.90
7.3.100.0090.00514.88
7.3.90.0070.01014.91
7.3.80.0040.01214.73
7.3.70.0100.01214.92
7.3.60.0090.00614.75
7.3.50.0030.01214.76
7.3.40.0150.00214.93
7.3.30.0090.00714.76
7.3.20.0090.00615.76
7.3.10.0090.00815.88
7.3.00.0060.01215.74
7.2.330.0090.00916.58
7.2.320.0090.01216.59
7.2.310.0100.00716.49
7.2.300.0090.01216.57
7.2.290.0040.01216.70
7.2.240.0070.00714.90
7.2.230.0050.00915.11
7.2.220.0040.01015.08
7.2.210.0100.00815.08
7.2.200.0080.00815.11
7.2.190.0150.00315.13
7.2.180.0050.01415.11
7.2.170.0150.00315.06
7.2.160.0130.00415.03
7.2.150.0070.01116.05
7.2.140.0100.00515.87
7.2.130.0130.00716.07
7.2.120.0070.01116.00
7.2.110.0060.01015.77
7.2.100.0100.01016.10
7.2.90.0070.01216.13
7.2.80.0170.00616.17
7.2.70.0020.01515.90
7.2.60.0050.01216.05
7.2.50.0050.01116.15
7.2.40.0100.00616.09
7.2.30.0090.00816.10
7.2.20.0060.00915.89
7.2.10.0080.01016.02
7.2.00.0140.00616.10
7.1.330.0080.00515.85
7.1.320.0110.00414.82
7.1.310.0100.00714.89
7.1.300.0100.00314.68
7.1.290.0050.01114.94
7.1.280.0020.01214.97
7.1.270.0080.00914.82
7.1.260.0080.00914.90
7.1.250.0070.00714.91

preferences:
35.84 ms | 403 KiB | 5 Q