summaryrefslogtreecommitdiff
path: root/ext/standard/type.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/type.c')
-rw-r--r--ext/standard/type.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/ext/standard/type.c b/ext/standard/type.c
index 5a8b2a0b9d..1036dd7d06 100644
--- a/ext/standard/type.c
+++ b/ext/standard/type.c
@@ -321,6 +321,19 @@ PHP_FUNCTION(is_array)
}
/* }}} */
+/* {{{ Returns true if $array is an array whose keys are all numeric, sequential, and start at 0 */
+PHP_FUNCTION(array_is_list)
+{
+ HashTable *array;
+
+ ZEND_PARSE_PARAMETERS_START(1, 1)
+ Z_PARAM_ARRAY_HT(array)
+ ZEND_PARSE_PARAMETERS_END();
+
+ RETURN_BOOL(zend_array_is_list(array));
+}
+/* }}} */
+
/* {{{ Returns true if variable is an object
Warning: This function is special-cased by zend_compile.c and so is usually bypassed */
PHP_FUNCTION(is_object)
@@ -390,8 +403,8 @@ PHP_FUNCTION(is_callable)
zval *var, *callable_name = NULL;
zend_string *name;
char *error;
- zend_bool retval;
- zend_bool syntax_only = 0;
+ bool retval;
+ bool syntax_only = 0;
int check_flags = 0;
ZEND_PARSE_PARAMETERS_START(1, 3)