0
zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &r1, &n, &r2, &m)

What's "ss" for here?

DaveRandom
  • 87,921
  • 11
  • 154
  • 174
pc2
  • 3
  • 1

4 Answers4

3

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)
codaddict
  • 445,704
  • 82
  • 492
  • 529
2

"ss" is type_spec string

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

thedev
  • 2,816
  • 8
  • 34
  • 47
1

It is type_spec. Check here

Starx
  • 77,474
  • 47
  • 185
  • 261
0

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.

an_animal
  • 86
  • 6