public static function read($message = null, bool $nl = false, array $opts = []): string
    {
        if ($message) {
            self::write($message, $nl);
        }

        $opts = \array_merge([
            'length' => 1024,
            'stream' => \STDIN,
        ], $opts);

        return \file_get_contents($opts['stream'], $opts['length']);
    }
public static function read($message = null, bool $nl = false, array $opts = []): string
    {
        if ($message) {
            self::write($message, $nl);
        }

        $opts = \array_merge([
            'length' => 1024,
            'stream' => \STDIN,
        ], $opts);

        return \file_get_contents($opts['stream'], $opts['length']);
    }
public static function read ( $ message = null , bool $ nl = false , array $ opts = [ ] ) : string { if ( $ message ) { self :: write ( $ message , $ nl ) ; } $ opts = \ array_merge ( [ 'length' => 1024 , 'stream' => \ STDIN , ] , $ opts ) ; return \ file_get_contents ( $ opts [ 'stream' ] , $ opts [ 'length' ] ) ; }
Read message from STDIN

@param mixed $message
@param bool  $nl
@param array $opts
@return string
Read message from STDIN