Checks for EOF.

@return boolean
979696
public function eof()
    {
        return !$this->_streams || ($this->_current >= count($this->_streams) - 1 && $this->_streams[$this->_current]->eof());
    }
602452
public function isTrue(): bool
    {
        return (
            in_array($this->string, ['ok']) ||
            (true === filter_var($this->string, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE))
        );
    }
274971
public function isEof()
    {
        if ($this->nextRow) {
            return false;
        } else {
            try {
                $eof = feof($this->resource);
            } catch (\Exception $e) {
                throw new DataSourceException($e->getMessage(), $this->curRowNum);
            }
            if ($eof) {
                return true;
            } else {
                $this->nextRow = $this->getRow();
                if (!$this->nextRow || $this->nextRow === ['']) {
                    try {
                        $eof = feof($this->resource);
                    } catch (\Exception $e) {
                        throw new DataSourceException($e->getMessage(), $this->curRowNum);
                    }
                    if ($eof) {
                        // RFC4180: The last record in the file may or may not have an ending line break.
                        return true;
                    } else {
                        throw new DataSourceException('invalid csv file', $this->curRowNum);
                    }
                } else {
                    return false;
                }
            }
        }
    }
779598
protected function endTag() {
        if ($this->scanner->current() != '/') {
            return false;
        }
        $tok = $this->scanner->next();

        // a-zA-Z -> tagname
        // > -> parse error
        // EOF -> parse error
        // -> parse error
        if (!ctype_alpha($tok)) {
            $this->parseError("Expected tag name, got '%s'", $tok);
            if ($tok == "\0" || $tok === false) {
                return false;
            }
            return $this->bogusComment('</');
        }

        $name = strtolower($this->scanner->charsUntil("\n\f \t>"));
        // Trash whitespace.
        $this->scanner->whitespace();

        if ($this->scanner->current() != '>') {
            $this->parseError("Expected >, got '%s'", $this->scanner->current());
            // We just trash stuff until we get to the next tag close.
            $this->scanner->charsUntil('>');
        }

        $this->events->endTag($name);
        $this->scanner->next();
        return true;
    }
1294229
public function eof()
    {
        if (!\is_resource($this->stream)) {
            throw new \TypeError();
        }
        return $this->isAttached() ? \feof($this->stream) : true;
    }
711597
public function end()
    {
        if ($this->_limit === null) {
            return $this->seek(0, SEEK_END);
        } else {
            return $this->seek($this->_start + $this->_limit);
        }
    }
520592
public function eof()
    {
        if($this->getType() == 'memory') {
            $result = $this->_position >= $this->_length;
        } else {
            $result = parent::eof();
        }

        return $result;
    }
1002021
public function eof()
    {
        $this->_ensureReadable();
        if ($this->_limit === null) {
            return feof($this->_resource);
        }
        $position = $this->tell();
        $max = $this->_start + $this->_limit;
        return $position >= $max;
    }
813190
public function close()
    {
        if ($this->closed) {
            return false;
        }
        $this->closed = true;
        if ($this->fdCacheKey !== null) {
            FileSystem::$fdCache->invalidate($this->fdCacheKey);
        }
        if ($this->fd === null) {
            return false;
        }

        if (!FileSystem::$supported) {
            fclose($this->fd);
            return false;
        }
        $r = eio_close($this->fd, EIO_PRI_MAX);
        $this->fd = null;
        return $r;
    }
155100
public function isFalse(): bool
    {
        return (
            in_array($this->string, ['']) ||
            (false === filter_var($this->string, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE))
        );
    }
185085
public function stream_eof()
	{
		$eof = $this->pos >= strlen($this->data);
		// Workaround for bug in PHP 5.0.x: http://bugs.php.net/27508
		if (version_compare(PHP_VERSION, '5.0', '>=') &&
			version_compare(PHP_VERSION, '5.1', '<')) {

		   $eof = !$eof;
		}
		return $eof;
	}
362108
public function flush()
    {
        $buffer = '';
        while (!$this->eof()) {
            $buffer .= $this->read($this->_bufferSize);
        }
        return $buffer;
    }
435976
public function valid()
    {
        if ($this->fileSize == 0) {
            return false;
        }

        if (feof($this->handle)) {
            return false;
        }

        $current = fgets($this->handle);

        if (trim($current) === '' && feof($this->handle)) {
            return false;
        } else {
            fseek($this->handle, $this->offset);
        }

        return true;
    }
566953
public function isCheckedOut()
    {
        // function to inform us as to whether the current collection is checked out
        $db = Database::connection();
        if (isset($this->isCheckedOutCache)) {
            return $this->isCheckedOutCache;
        }

        $q = "select cIsCheckedOut, cCheckedOutDatetimeLastEdit from Pages where cID = '{$this->cID}'";
        $r = $db->executeQuery($q);

        if ($r) {
            $row = $r->fetchRow();
            // If cCheckedOutDatetimeLastEdit is present, get the time span in seconds since it's last edit.
            if (! empty($row['cCheckedOutDatetimeLastEdit'])) {
                $dh = Core::make('helper/date');
                $timeSinceCheckout = ($dh->getOverridableNow(true) - strtotime($row['cCheckedOutDatetimeLastEdit']));
            }

            if ($row['cIsCheckedOut'] == 0) {
                return false;
            } else {
                if (isset($timeSinceCheckout) && $timeSinceCheckout > CHECKOUT_TIMEOUT) {
                    $this->forceCheckIn();
                    $this->isCheckedOutCache = false;

                    return false;
                } else {
                    $this->isCheckedOutCache = true;

                    return true;
                }
            }
        }
    }
1333869
public function check()
    {
        $cutoffTime =  strtotime($this->relativeAge, DBDatetime::now()->Format('U'));
        $files = $this->getFiles();
        $invalidFiles = [];
        $validFiles = [];
        $checkFn = $this->checkFn;
        $allValid = true;
        if ($files) {
            foreach ($files as $file) {
                $fileTime = $checkFn($file);
                $valid = ($this->compareOperand == '>') ? ($fileTime >= $cutoffTime) : ($fileTime <= $cutoffTime);
                if ($valid) {
                    $validFiles[] = $file;
                } else {
                    $invalidFiles[] = $file;
                    if ($this->checkType == self::CHECK_ALL) {
                        return [
                            EnvironmentCheck::ERROR,
                            sprintf(
                                'File "%s" doesn\'t match age check (compare %s: %s, actual: %s)',
                                $file,
                                $this->compareOperand,
                                date('c', $cutoffTime),
                                date('c', $fileTime)
                            )
                        ];
                    }
                }
            }
        }

        // If at least one file was valid, count as passed
        if ($this->checkType == self::CHECK_SINGLE && count($invalidFiles) < count($files)) {
            return [EnvironmentCheck::OK, ''];
        }
        if (count($invalidFiles) == 0) {
            return [EnvironmentCheck::OK, ''];
        }
        return [
            EnvironmentCheck::ERROR,
            sprintf('No files matched criteria (%s %s)', $this->compareOperand, date('c', $cutoffTime))
        ];
    }
1190288
public function eof()
	{
		if (!$this->fh)
		{
			throw new FilesystemException('File not open');
		}

		// Capture PHP errors
		$php_errormsg = '';
		$trackErrors  = ini_get('track_errors');
		ini_set('track_errors', true);

		switch ($this->processingmethod)
		{
			case 'gz':
				$res = gzeof($this->fh);

				break;

			case 'bz':
			case 'f':
			default:
				$res = feof($this->fh);

				break;
		}

		// Restore error tracking to what it was before
		ini_set('track_errors', $trackErrors);

		if ($php_errormsg)
		{
			throw new FilesystemException($php_errormsg);
		}

		// Return the result
		return $res;
	}
658167
protected function checkLuck()
    {
        $i = 1;
        while (true) {
            $fib = $this->fib($i);
            if ($fib == $this->counter) return true;
            if ($fib > $this->counter) return false;
            $i++;
        }
    }