Hello Michael,

  actually your class could have another object with get/set handlers
implemented, nothing more. This could be mapped through the handlers
to your int i.

marcus

Friday, October 28, 2005, 10:44:42 PM, you wrote:

> Sara Golemon wrote:

>>> Would you say it's possible that one can maintain i as class 
>>> property with write access through references?
>>> 
>> Nope, because PHP variables are loose typed.
>> 
>> Say you *did* have some way to bind my_obj->i to a userspace variable
>> (e.g.: $i =& $this->i; ).  The next instruction could say $i =
>> 'foo';, then what is the engine supposed to do with that?
>> 
>> If you want i to have any visibility in userspace, then it needs to
>> be a zval, and that means it can be modified, and that means that
>> you'll need to be prepared to re-cast it back to the right type
>> later.  Kinda sucks, but it sucks for a good reason...

> Uhm... you're so right, thanks, that cleared my mind and makes me
> remember my first post to the list ;)

> Thank you,
> -- 
> Michael - <mike(@)php.net>
> http://dev.iworks.at/ext-http/http-functions.html.gz




Best regards,
 Marcus

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to