Answer the question
In order to leave comments, you need to log in
Is the is_array function reliable?
Is php is_array function safe?
that is, is there a guarantee that if NOT an array arrives, it will return FALSE for any?
Answer the question
In order to leave comments, you need to log in
On the example of PHP5.6.14
ext/standard/type.c PHP_FUNCTION(is_array) calls php_is_type (the function is defined in the same place, just above)
It checks for equality Z_TYPE_PP(arg).
Z_TYPE_PP, respectively, macro from Zend/zend_operators.h
#define Z_TYPE(zval) (zval).type
#define Z_TYPE_P(zval_p) Z_TYPE(*zval_p)
#define Z_TYPE_PP(zval_pp) Z_TYPE(**zval_pp)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question