protected function runShell($command, &$stdout = '', &$stderr = '', $input = '')
    {
        $descriptorSpecs = [
            0 => ["pipe", "r"],
            1 => ["pipe", "w"],
            2 => ["pipe", "w"]
        ];
        // Invoke command
        $pipes = [];
        $proc = proc_open($command, $descriptorSpecs, $pipes);

        if (!is_resource($proc)) {
            return 255;
        }

        // Send content as input
        fwrite($pipes[0], $input);
        fclose($pipes[0]);

        // Get output
        $stdout = stream_get_contents($pipes[1]);
        fclose($pipes[1]);
        $stderr = stream_get_contents($pipes[2]);
        fclose($pipes[2]);

        // Get result
        return proc_close($proc);
    }