src/Collection/ArrayCollection.php
public function where($key, $value, bool $strict = true): ArrayCollection
    {
        return $this->filter(function ($item) use ($key, $value, $strict) {
            if (!isset($item[$key])) {
                return false;
            }

            return $strict ? $item[$key] === $value : $item[$key] == $value;
        });
    }
public function where($key, $value, bool $strict = true): ArrayCollection
    {
        return $this->filter(function ($item) use ($key, $value, $strict) {
            if (!isset($item[$key])) {
                return false;
            }

            return $strict ? $item[$key] === $value : $item[$key] == $value;
        });
    }
public function where ( $ key , $ value , bool $ strict = true ) : ArrayCollection { return $ this -> filter ( function ( $ item ) use ( $ key , $ value , $ strict ) { if ( ! isset ( $ item [ $ key ] ) ) { return false ; } return $ strict ? $ item [ $ key ] === $ value : $ item [ $ key ] == $ value ; } ) ; }
Creates a filtered collection by key and value

@param mixed $key    The key
@param mixed $value  The value
@param bool  $strict Whether comparison should be strict

@return ArrayCollection
Creates a filtered collection by key and value