Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Execute command via shell and return the complete output as a string
<?php shell_exec(string $command): string|false|null
<?php             return [1, 1];

        }



        $sttyMode = shell_exec('stty -g');

        shell_exec('stty -icanon -echo');



        @fwrite($input, terminal()->getCsi() . '6n');
<?php         }



        $sttyMode = shell_exec('stty -g');

        shell_exec('stty -icanon -echo');



        @fwrite($input, terminal()->getCsi() . '6n');
<?php         $code = trim(fread($input, 1024));



        shell_exec(sprintf('stty %s', $sttyMode));



        sscanf($code, terminal()->getCsi() . '%d;%dR', $row, $col);