Пример #1
0
            if ($argv[1] === 'start') {
                $this->start();
            } else {
                if ($argv[1] === 'restart') {
                    $this->stop();
                    $this->start();
                } else {
                    if ($argv[1] === 'status') {
                        $this->status();
                    } else {
                        if ($argv[1] === 'foreground') {
                            $this->foreground();
                        } else {
                            if ($argv[1] === 'reload') {
                                $this->reload();
                            } else {
                                $this->help($argv[0]);
                            }
                        }
                    }
                }
            }
        }
    }
}
$daemon = new Daemon(80, 80, new Test());
$daemon->main($argv);
?>