public function lastPid() { $lock_file = $this->lockFile(); return file_exists($lock_file) ? (int) trim(file_get_contents($lock_file)) : null; }