}
/* break omitted intentionally */
- case IS_STRING:
case IS_LONG:
case IS_DOUBLE:
case IS_FALSE:
case IS_TRUE:
convert_to_string_ex(arg);
+ case IS_STRING:
if (UNEXPECTED(Z_ISREF_P(arg))) {
/* it's dangerous to return pointers to string
buffer of referenced variable, because it can
}
/* break omitted intentionally */
- case IS_STRING:
case IS_LONG:
case IS_DOUBLE:
case IS_FALSE:
case IS_TRUE:
convert_to_string_ex(arg);
+ case IS_STRING:
if (UNEXPECTED(Z_ISREF_P(arg))) {
/* it's dangerous to return pointers to string
buffer of referenced variable, because it can
}
/* }}} */
-
/* {{{ proto mixed func_get_arg(int arg_num)
Get the $arg_num'th argument that was passed to the function */
ZEND_FUNCTION(func_get_arg)
}
/* }}} */
-
/* {{{ proto array func_get_args()
Get an array of the arguments that were passed to the function */
ZEND_FUNCTION(func_get_args)
}
/* }}} */
-
/* {{{ proto int strlen(string str)
Get string length */
ZEND_FUNCTION(strlen)
{
- char *s1;
- int s1_len;
+ zend_string *s;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &s1, &s1_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S", &s) == FAILURE) {
return;
}
- RETVAL_LONG(s1_len);
+ RETVAL_LONG(s->len);
}
/* }}} */