public function exists(callable $func)
    {
        $isExists = false;

        foreach ($this->elements as $key => $value) {
            if ($func($key, $value)) {
                $isExists = true;
                break;
            }
        }

        return $isExists;
    }
public function exists(callable $func)
    {
        $isExists = false;

        foreach ($this->elements as $key => $value) {
            if ($func($key, $value)) {
                $isExists = true;
                break;
            }
        }

        return $isExists;
    }
public function exists ( callable $ func ) { $ isExists = false ; foreach ( $ this -> elements as $ key => $ value ) { if ( $ func ( $ key , $ value ) ) { $ isExists = true ; break ; } } return $ isExists ; }
Find the given value in An array using a closure

@param callable $func

@return bool Returns true if the given value is found, false otherwise
Find the given value in An array using a closure