AW: WG: [PHP-DEV] zval question
| From: | Harald Radi | Date: | Fri, 26 Jan 2001 01:09:52 +0000 |
| Subject: | AW: WG: [PHP-DEV] zval question | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-45077@lists.php.net to get a copy of this message | ||
> Okay, I don't know anything about this. You can't always pass it by
> reference and somehow figure out if there is any data to return to
> the user from the com object function? I guess not, else you would
> have thought of it.
>
> One possible ugly hack would be to add arguments that tells whether
> they should be changed.
>
> Say that you wanted to have three arguments a, b, c, instead of doing
>
> f(a,&b,&c)
>
> you could let the interface be
>
> f(a,"ro",b,"rw",c,"rw")
imho the best solution would be to map the VARIANT datatype from
c into php. this would keep all possibilities open for the user, since only
variant datatypes can by passed by reference.
and like zval the variant datatype has a flag that indicates if it should be
passed by_ref.
i don't know much about the zend api (are there any docs ?), so what would
be the best possibility to do so ?
should i define the struct as a class in all of my php scripts or would it
be possible to create datatypes in my extension that are usable inside the
scripts.
i thought about creating a extenson-object that only implements propget and
propput. any advices ?
thanks in advance.
harald.