Re: cvs: pear /PECL/namazu Makefile.in README.en README.ja config.m4 php_namazu.c php_namazu.h php_namazu_globals.h /PECL/namazu/sample form.php
search.php search2.php
| From: | Martin Jansen | Date: | Wed, 09 Jan 2002 13:45:36 +0000 |
| Subject: | Re: cvs: pear /PECL/namazu Makefile.in README.en README.ja config.m4 php_namazu.c php_namazu.h php_namazu_globals.h /PECL/namazu/sample form.php search.php search2.php |
||
| References: | 1 | Groups: | php.pear.cvs |
| Request: | Send a blank email to pear-cvs+get-1884@lists.php.net to get a copy of this message | ||
On Wed, 09 Jan 2002 13:13:29 +0100, Tomas V.V.Cox wrote:
>Markus Fischer wrote:
>>
>> Also, when using php_error() please always expose the context
>> of the current function, e.g.
>>
>> php_error(E_WARNING, "%s(): illegal foobar '%d'",
>> get_active_function_name(TSRMLS_C), value);
>>
>
>Is there a way of having that also in php space? Something like __FUNC__
>or get_active_func() (suitable also for methods).
I played around with that some time ago, but did not
really manage. (Don't know anything of C.) I think that
I tried
zend_sprintf(get_active_function_name(TSRMLS_D))
or something like that in order to get the current userland
function, but I only got the name of the internal PHP function
where this line was called. May be some one else with more
knowledge of C can write such a function. (Doesn't look like
much work.)
Markus?
- Martin