*/
static void php_split(INTERNAL_FUNCTION_PARAMETERS, int icase)
{
- long arg_count;
+ long count = -1;
regex_t re;
regmatch_t subs[1];
char *spliton, *str, *strp, *endp;
int spliton_len, str_len;
- int err, size, count = -1, copts = 0;
- int argc = ZEND_NUM_ARGS();
+ int err, size, copts = 0;
- if (zend_parse_parameters(argc TSRMLS_CC, "ss|l", &spliton, &spliton_len, &str, &str_len, &arg_count) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|l", &spliton, &spliton_len, &str, &str_len, &count) == FAILURE) {
return;
}
- if (argc > 2) {
- count = arg_count;
- }
-
if (icase) {
copts = REG_ICASE;
}