RE: FW: [PHP-DEV] Getting object property value From: Mathieu Kooiman (caps <email protected>)
Date: 08/15/00

As far as I know (correct me if I'm wrong)
HASH_OF() only works on arrays? thus always returns (*Object)->value.ht?

-- CaPS

-----Oorspronkelijk bericht-----
Van: Andrei Zmievski [mailto:andrei <email protected>]
Verzonden: dinsdag 15 augustus 2000 16:20
Aan: Mathieu Kooiman
CC: PHP Development
Onderwerp: Re: FW: [PHP-DEV] Getting object property value

On Tue, 15 Aug 2000, Mathieu Kooiman wrote:
> /* Writing this from my memory, am not sure about some stuff.. but It
should
> get you
> started.. */
>
> PHP_FUNCTION (MyFunction) {
> pval **MyObject;
> HashTable *Properties;
>
> if ( zend_get_parameters_ex(1, &MyObject) == FAILURE)
> WRONG_PARAM_COUNT;
>
> Properties = (*MyObject)->obj.ce->default_properties;
> // perhaps its 'properties' look at struct _zend_class_entry { }
> // This is a normal hashtable, use zend_hash_*() on it.
> }

Or you can simply do:

Properties = HASH_OF(*MyObject);

-Andrei

Linux is like living in a teepee.
No Windows, no Gates, Apache in house.
                    - Usenet signature

--
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>

-- 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>