public function offsetExists($offset)
    {
        try {
            $res = $this
                ->seekToOffset($offset)
                ->valid();
        } catch (OutOfRangeException $e) {
            $res = false;
        }
        return (bool) $res;
    }
public function offsetExists($offset)
    {
        try {
            $res = $this
                ->seekToOffset($offset)
                ->valid();
        } catch (OutOfRangeException $e) {
            $res = false;
        }
        return (bool) $res;
    }
public function offsetExists ( $ offset ) { try { $ res = $ this -> seekToOffset ( $ offset ) -> valid ( ) ; } catch ( OutOfRangeException $ e ) { $ res = false ; } return ( bool ) $ res ; }
Test if an offset exists

@param   int/string   $offset
@return  bool
Test if an offset exists