public static function createFromString(string $content = '')
    {
        $resource = fopen('php://temp', 'r+');
        fwrite($resource, $content);

        $instance = new static($resource);
        $instance->should_close_stream = true;

        return $instance;
    }
public static function createFromString(string $content = '')
    {
        $resource = fopen('php://temp', 'r+');
        fwrite($resource, $content);

        $instance = new static($resource);
        $instance->should_close_stream = true;

        return $instance;
    }
public static function createFromString ( string $ content = '' ) { $ resource = fopen ( 'php://temp' , 'r+' ) ; fwrite ( $ resource , $ content ) ; $ instance = new static ( $ resource ) ; $ instance -> should_close_stream = true ; return $ instance ; }
Return a new instance from a string.

@return static
Return a new instance from a string .