Re: Re: hook cast_object handler in userspace
| From: | (Marcus B�rger) | Date: | Sun, 03 Aug 2003 22:18:46 +0000 |
| Subject: | Re: Re: hook cast_object handler in userspace | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-3711@lists.php.net to get a copy of this message | ||
Hello Cristiano,
Monday, August 4, 2003, 12:10:26 AM, you wrote:
CD> Hi Marcus,
>> Not good enough it seems :-(
CD> I'll get there... ;-)
>> Some comments:
>> - Please always start with tabs, you used spaces to begin lines.
CD> done.
seems like :-)
>> - TSRMLS_FETCH() is a variable declaration, so it cannot be used inside a
>> function.
CD> If I wipe TSRMLS_FETCH() out, I get this error:
CD> /usr/src/zend2/php-src/Zend/zend.c:234: `tsrm_ls' undeclared (first use in
CD> this function)
CD> So I kept it.
sure, and now you used it corretly.
>> - Still you haven't checked whether or not the function to_string() is
>> available.
CD> I checked it with get_method, but I don't know how to call a function
CD> (internal, user or overloaded) using the zend_function union.
CD> So I check with "get_method" but still call with "call_user_function"
CD> when
CD> the union has the type=ZEND_USER_FUNCTION.
CD> I don't know what to do if type=ZEND_INTERNAL_FUNCTION or
CD> type=ZEND_OVERLOADED_FUNCTION, so I just do the default behavior.
CD> Plz, if you could help on this...
They are simply other types of function just don't care call_user_function_ex()
will take care of the differences. In other words you won't need swicth/case.
--
Best regards,
Marcus mailto:helly@php.net