Re: [PHP-DEV] Getting object property value From: Andrei Zmievski (andrei <email protected>)
Date: 08/15/00

On Tue, 15 Aug 2000, Gustavo Badauy wrote:
> What I could get from the code below MyFunction receives an object as
> parameter. What I'm trying to do is, from inside a method, read/set the
> properties.
>
> For example in a function I do:
>
> object_init (return_value);
> add_property_long (return_value,"Birthday",Birthday);
> add_method(return_value,"GetUserAge",UserAge);
>
> in PHP_FUNCTION(GetUserAge), how would I get the value of Birthday?
>
> Sorry if it was explained below, but I just couldn't understand it.

zval **birthday;
zend_hash_find(HASH_OF(return_value), "GetUserAge", sizeof("GetUserAge"), (void**)&birthday);

-Andrei

"Man, if you gotta ask you'll never know."
 - Louis Armstrong, when asked "What is jazz?"

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>