/* }}} */
/* {{{ proto bool is_string(mixed var)
- Returns true if variable is a string */
+ Returns true if variable is a Unicode or binary string */
PHP_FUNCTION(is_string)
{
- php_is_type(INTERNAL_FUNCTION_PARAM_PASSTHRU, UG(unicode) ? IS_UNICODE : IS_STRING);
+ zval **arg;
+
+ if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Only one argument expected");
+ RETURN_FALSE;
+ }
+
+ if (Z_TYPE_PP(arg) == IS_UNICODE || Z_TYPE_PP(arg) == IS_STRING) {
+ RETURN_TRUE;
+ } else {
+ RETURN_FALSE;
+ }
}
/* }}} */