public function start(): int
    {
        $cmd = $this->getStartCmd();

        exec($cmd, $output, $ret);
        if ($ret !== 0) {
            throw new Exception('Error staring build-in server.');
        }

        $this->pid = (int)$output[0];
        usleep(100000); // We need to allow some time for server to start.

        return $this->pid;
    }