开发者

Anyone familiar with PHP source code?

zend_parse开发者_如何学编程_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &r1, &n, &r2, &m)

What's "ss" for here?


The type specifier in your case is "ss". The specifier s is for a string. Since you are requesting two string parameters you need to supply two s as ss:

zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &field1 &field1_length, 
                                                       &field2, &field2_length)


"ss" is type_spec string

check this rosource out http://docstore.mik.ua/orelly/weblinux2/php/ch14_07.htm


It is type_spec. Check here


that php function expects 2 strings parameteres, that's why 2 s's. every string in php is defined by a pointer and a length. that's why you have

&r1, &n, -> 1st string &r2, &m -> 2nd string.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜