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']);
    }