Re: zend_parse_paramters can not get the length of string parameter
| From: | Antony Dovgal | Date: | Sat, 07 Mar 2009 10:54:45 +0000 |
| Subject: | Re: zend_parse_paramters can not get the length of string parameter | ||
| References: | 1 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-6198@lists.php.net to get a copy of this message | ||
On 07.03.2009 09:22, Zhuguo Shi wrote:
> Hi there,
> I am using the following code to get parameters
>
>> if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lr",
>> &text, &text_len, &search_method, dict_rsrc) ==
>> FAILURE) {
>> RETURN_FALSE;
>> }
>
> but the text_len is always 0. When I use php_printf("text is %s",text),
> it exactly output what I want.
> Can any one give me some clue that what may cause problems like this?
Not until you show us which types you use for these variables.
And did you forget '&' before dict_rsrc?
--
Wbr,
Antony Dovgal