public static function getStream(&$string)
    {
        if (!self::$_id) {
            stream_wrapper_register(self::WRAPPER_NAME, __CLASS__);
        }

        /* Needed to keep reference. */
        $ob = new stdClass;
        $ob->string = &$string;

        return fopen(
            self::WRAPPER_NAME . '://' . ++self::$_id,
            'wb',
            false,
            stream_context_create(array(
                self::WRAPPER_NAME => array(
                    'string' => $ob
                )
            ))
        );
    }
public static function getStream(&$string)
    {
        if (!self::$_id) {
            stream_wrapper_register(self::WRAPPER_NAME, __CLASS__);
        }

        /* Needed to keep reference. */
        $ob = new stdClass;
        $ob->string = &$string;

        return fopen(
            self::WRAPPER_NAME . '://' . ++self::$_id,
            'wb',
            false,
            stream_context_create(array(
                self::WRAPPER_NAME => array(
                    'string' => $ob
                )
            ))
        );
    }
public static function getStream ( & $ string ) { if ( ! self :: $ _id ) { stream_wrapper_register ( self :: WRAPPER_NAME , __CLASS__ ) ; } /* Needed to keep reference. */ $ ob = new stdClass ; $ ob -> string = & $ string ; return fopen ( self :: WRAPPER_NAME . '://' . ++ self :: $ _id , 'wb' , false , stream_context_create ( array ( self :: WRAPPER_NAME => array ( 'string' => $ ob ) ) ) ) ; }
Create a stream from a PHP string.

@since 2.1.0

@param string &$string  A PHP string variable.

@return resource  A PHP stream pointing to the variable.
Create a stream from a PHP string .