Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Execute an external program and display the output
<?php system(string $command, int &$result_code = null): string|false
<?php function terminal_cursor_position()

{

    $ttyprops = trim(`stty -g`);

    system('stty -icanon -echo');



    $term = fopen('/dev/tty', 'w');

    fwrite($term, "\033[6n");
<?php     $buf = fread(STDIN, 16);



    system("stty '$ttyprops'");



    #echo bin2hex($buf) . "\n";