private function readStub()
{
$stub = "";
while (!feof($this->fd)) {
$line = fgets($this->fd);
$stub .= $line;
if (false !== stripos($line, self::HALT_COMPILER)) {
/* check for '?>' on a separate line */
if ('?>' === $this->readVerified($this->fd, 2)) {
$stub .= '?>' . fgets($this->fd);
} else {
fseek($this->fd, -2, SEEK_CUR);
}
break;
}
}
return $stub;
}