command = $cmd; } function execute(?int &$result = nullptr): string { $stdout = []; if(Shell::isPowershell()) { $cmd = escapeshellarg($this->command); exec("powershell -Command $this->command", $stdout, $result); } else { exec($this->command, $stdout, $result); } return implode(PHP_EOL, $stdout); } function start(): string { if(Shell::isPowershell()) { $cmd = escapeshellarg($this->command); pclose(popen("start /b powershell -Command $this->command", "r")); } else { system("nohup " . $this->command . " > /dev/null 2>/dev/null &"); } return $this->command; } }; } }