Re: [PHP-DEV] Re: Q. zend_parse_parameters() - allow grouping of optional parameters.

2007-10-10 Thread Andrei Zmievski
Use quite parameter parsing: if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "lll", &m, &d, &y) != SUCCESS && zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "ll", &m, &d, &y, &h, &min, &s) != SUCCESS && zend_parse_paramet

[PHP-DEV] Re: Q. zend_parse_parameters() - allow grouping of optional parameters.

2007-10-10 Thread Scott MacVicar
if (ZEND_NUM_ARGS() != 3 && ZEND_NUM_ARGS() != 6 && ZEND_NUM_ARGS() != 7) { WRONG_PARAM_COUNT; } Will let you check that there are 3, 6 and 7 parameters. Scott Richard Quadling wrote: > Hi. > > From what I understand about the argument list for > zend_parse_parameters(), you separate opt