function next() { while (true) { $line = fgets($this->stdout); if ($line === false) $this->entry = false; elseif ($line[0] == "-") continue; else $this->entry = json_decode($line); break; } }