We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ff9321e commit 8c6d6b2Copy full SHA for 8c6d6b2
src/array.php
@@ -1,15 +1,14 @@
1
<?php
2
3
if (!function_exists('array_except_value')) {
4
- function array_except_value($array, $value)
+ function array_except_value(array $array, $value)
5
{
6
if (!is_array($value)) {
7
$value = [$value];
8
}
9
10
foreach ($value as $item) {
11
- $key = array_search($item, $array);
12
- if ($key !== false) {
+ while (($key = array_search($item, $array, true)) !== false) {
13
unset($array[$key]);
14
15
0 commit comments