public static function stdin($raw = false)
    {
        $promise = new Promise(function($r, $c) use ($raw) {
            static::getStdInStream()->once('data', function($chunk) use ($r, $raw) {
                if (!$raw) {
                    $chunk = rtrim($chunk, PHP_EOL);
                }
                $r($chunk);
            });
        });
        return $promise;
    }
public static function stdin($raw = false)
    {
        $promise = new Promise(function($r, $c) use ($raw) {
            static::getStdInStream()->once('data', function($chunk) use ($r, $raw) {
                if (!$raw) {
                    $chunk = rtrim($chunk, PHP_EOL);
                }
                $r($chunk);
            });
        });
        return $promise;
    }
public static function stdin ( $ raw = false ) { $ promise = new Promise ( function ( $ r , $ c ) use ( $ raw ) { static :: getStdInStream ( ) -> once ( 'data' , function ( $ chunk ) use ( $ r , $ raw ) { if ( ! $ raw ) { $ chunk = rtrim ( $ chunk , PHP_EOL ) ; } $ r ( $ chunk ) ; } ) ; } ) ; return $ promise ; }
Gets input from STDIN and returns a string right-trimmed for EOLs.

@param bool $raw If set to true, returns the raw string without trimming
@return ExtendedPromiseInterface with string the string read from stdin
Gets input from STDIN and returns a string right - trimmed for EOLs .