public function read($prompt, $style = '') {
        $this->write($prompt . ' ', $style);
        $stdin = fopen('php://stdin', 'r');
        $str = fgets($stdin, 4096);
        fclose($stdin);
        return preg_replace('{\r?\n$}D', '', $str);
    }
public function read($prompt, $style = '') {
        $this->write($prompt . ' ', $style);
        $stdin = fopen('php://stdin', 'r');
        $str = fgets($stdin, 4096);
        fclose($stdin);
        return preg_replace('{\r?\n$}D', '', $str);
    }
public function read ( $ prompt , $ style = '' ) { $ this -> write ( $ prompt . ' ' , $ style ) ; $ stdin = fopen ( 'php://stdin' , 'r' ) ; $ str = fgets ( $ stdin , 4096 ) ; fclose ( $ stdin ) ; return preg_replace ( '{\r?\n$}D' , '' , $ str ) ; }
Read a line from input with an optional prompt and optional style

@param string $prompt can be string to be prompted before reading from console
@param mixed $style can be null, a style code as string or an array of strings.

@return the line read from console
Read a line from input with an optional prompt and optional style