Re: Reusing PHP string value pointers
| From: | Marshall A. Greenblatt | Date: | Thu, 28 Nov 2002 16:53:08 +0000 |
| Subject: | Re: Reusing PHP string value pointers | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-91874@lists.php.net to get a copy of this message | ||
From: "Zeev Suraski" <zeev@zend.com>
> >When a PHP string variable is changed via a PHP script, such as:
> >
> >$foo = 'new value';
> >
> >what happens to the `value.str.val' pointer internally? Is it possible
to
> >have the new value assigned to the same `value.str.val' pointer that the
> >variable is currently using instead of having that pointer replaced by a
> >pointer to the new value?
>
> No, it's not possible (not in a reliable way anyway).
What about being able to register a callback function for variable
assignment? That way I can keep track of the pointer myself and copy the
new value to it when the variable value is changed in the PHP script. Would
anybody else be interested in this functionality?
>
> Zeev
>
Thanks,
Marshall