src/ORM/ArrayList.php
public function filterAny()
    {
        $keepUs = $this->normaliseFilterArgs(...func_get_args());

        $itemsToKeep = [];

        foreach ($this->items as $item) {
            foreach ($keepUs as $column => $value) {
                $extractedValue = $this->extractValue($item, $column);
                $matches = is_array($value) ? in_array($extractedValue, $value) : $extractedValue == $value;
                if ($matches) {
                    $itemsToKeep[] = $item;
                    break;
                }
            }
        }

        $list = clone $this;
        $list->items = array_unique($itemsToKeep, SORT_REGULAR);
        return $list;
    }
public function filterAny()
    {
        $keepUs = $this->normaliseFilterArgs(...func_get_args());

        $itemsToKeep = [];

        foreach ($this->items as $item) {
            foreach ($keepUs as $column => $value) {
                $extractedValue = $this->extractValue($item, $column);
                $matches = is_array($value) ? in_array($extractedValue, $value) : $extractedValue == $value;
                if ($matches) {
                    $itemsToKeep[] = $item;
                    break;
                }
            }
        }

        $list = clone $this;
        $list->items = array_unique($itemsToKeep, SORT_REGULAR);
        return $list;
    }
public function filterAny ( ) { $ keepUs = $ this -> normaliseFilterArgs ( ... func_get_args ( ) ) ; $ itemsToKeep = [ ] ; foreach ( $ this -> items as $ item ) { foreach ( $ keepUs as $ column => $ value ) { $ extractedValue = $ this -> extractValue ( $ item , $ column ) ; $ matches = is_array ( $ value ) ? in_array ( $ extractedValue , $ value ) : $ extractedValue == $ value ; if ( $ matches ) { $ itemsToKeep [ ] = $ item ; break ; } } } $ list = clone $ this ; $ list -> items = array_unique ( $ itemsToKeep , SORT_REGULAR ) ; return $ list ; }
Return a copy of this list which contains items matching any of these charactaristics.

@example // only bob in the list
$list = $list->filterAny('Name', 'bob');
@example // azis or bob in the list
$list = $list->filterAny('Name', array('aziz', 'bob');
@example // bob or anyone aged 21 in the list
$list = $list->filterAny(array('Name'=>'bob, 'Age'=>21));
@example // bob or anyone aged 21 or 43 in the list
$list = $list->filterAny(array('Name'=>'bob, 'Age'=>array(21, 43)));
@example // all bobs, phils or anyone aged 21 or 43 in the list
$list = $list->filterAny(array('Name'=>array('bob','phil'), 'Age'=>array(21, 43)));

@param string|array See {@link filter()}
@return static
Return a copy of this list which contains items matching any of these charactaristics .