Lines Matching refs:arg
346 ZEND_API const char *zend_zval_type_name(const zval *arg);
347 ZEND_API zend_string *zend_zval_get_legacy_type(const zval *arg);
352 ZEND_API zend_result zend_parse_parameter(int flags, uint32_t arg_num, zval *arg, const char *spec,…
491 #define array_init(arg) ZVAL_ARR((arg), zend_new_array(0)) argument
492 #define array_init_size(arg, size) ZVAL_ARR((arg), zend_new_array(size)) argument
493 ZEND_API void object_init(zval *arg);
494 ZEND_API zend_result object_init_ex(zval *arg, zend_class_entry *ce);
495 ZEND_API zend_result object_and_properties_init(zval *arg, zend_class_entry *ce, HashTable *propert…
502 ZEND_API void add_assoc_long_ex(zval *arg, const char *key, size_t key_len, zend_long n);
503 ZEND_API void add_assoc_null_ex(zval *arg, const char *key, size_t key_len);
504 ZEND_API void add_assoc_bool_ex(zval *arg, const char *key, size_t key_len, bool b);
505 ZEND_API void add_assoc_resource_ex(zval *arg, const char *key, size_t key_len, zend_resource *r);
506 ZEND_API void add_assoc_double_ex(zval *arg, const char *key, size_t key_len, double d);
507 ZEND_API void add_assoc_str_ex(zval *arg, const char *key, size_t key_len, zend_string *str);
508 ZEND_API void add_assoc_string_ex(zval *arg, const char *key, size_t key_len, const char *str);
509 ZEND_API void add_assoc_stringl_ex(zval *arg, const char *key, size_t key_len, const char *str, siz…
510 ZEND_API void add_assoc_array_ex(zval *arg, const char *key, size_t key_len, zend_array *arr);
511 ZEND_API void add_assoc_object_ex(zval *arg, const char *key, size_t key_len, zend_object *obj);
512 ZEND_API void add_assoc_reference_ex(zval *arg, const char *key, size_t key_len, zend_reference *re…
513 ZEND_API void add_assoc_zval_ex(zval *arg, const char *key, size_t key_len, zval *value);
528 ZEND_API void add_index_long(zval *arg, zend_ulong index, zend_long n);
529 ZEND_API void add_index_null(zval *arg, zend_ulong index);
530 ZEND_API void add_index_bool(zval *arg, zend_ulong index, bool b);
531 ZEND_API void add_index_resource(zval *arg, zend_ulong index, zend_resource *r);
532 ZEND_API void add_index_double(zval *arg, zend_ulong index, double d);
533 ZEND_API void add_index_str(zval *arg, zend_ulong index, zend_string *str);
534 ZEND_API void add_index_string(zval *arg, zend_ulong index, const char *str);
535 ZEND_API void add_index_stringl(zval *arg, zend_ulong index, const char *str, size_t length);
536 ZEND_API void add_index_array(zval *arg, zend_ulong index, zend_array *arr);
537 ZEND_API void add_index_object(zval *arg, zend_ulong index, zend_object *obj);
538 ZEND_API void add_index_reference(zval *arg, zend_ulong index, zend_reference *ref);
540 static zend_always_inline zend_result add_index_zval(zval *arg, zend_ulong index, zval *value) in add_index_zval() argument
542 return zend_hash_index_update(Z_ARRVAL_P(arg), index, value) ? SUCCESS : FAILURE; in add_index_zval()
545 ZEND_API zend_result add_next_index_long(zval *arg, zend_long n);
546 ZEND_API zend_result add_next_index_null(zval *arg);
547 ZEND_API zend_result add_next_index_bool(zval *arg, bool b);
548 ZEND_API zend_result add_next_index_resource(zval *arg, zend_resource *r);
549 ZEND_API zend_result add_next_index_double(zval *arg, double d);
550 ZEND_API zend_result add_next_index_str(zval *arg, zend_string *str);
551 ZEND_API zend_result add_next_index_string(zval *arg, const char *str);
552 ZEND_API zend_result add_next_index_stringl(zval *arg, const char *str, size_t length);
553 ZEND_API zend_result add_next_index_array(zval *arg, zend_array *arr);
554 ZEND_API zend_result add_next_index_object(zval *arg, zend_object *obj);
555 ZEND_API zend_result add_next_index_reference(zval *arg, zend_reference *ref);
557 static zend_always_inline zend_result add_next_index_zval(zval *arg, zval *value) in add_next_index_zval() argument
559 return zend_hash_next_index_insert(Z_ARRVAL_P(arg), value) ? SUCCESS : FAILURE; in add_next_index_zval()
564 ZEND_API void add_property_long_ex(zval *arg, const char *key, size_t key_len, zend_long l);
565 ZEND_API void add_property_null_ex(zval *arg, const char *key, size_t key_len);
566 ZEND_API void add_property_bool_ex(zval *arg, const char *key, size_t key_len, zend_long b);
567 ZEND_API void add_property_resource_ex(zval *arg, const char *key, size_t key_len, zend_resource *r…
568 ZEND_API void add_property_double_ex(zval *arg, const char *key, size_t key_len, double d);
569 ZEND_API void add_property_str_ex(zval *arg, const char *key, size_t key_len, zend_string *str);
570 ZEND_API void add_property_string_ex(zval *arg, const char *key, size_t key_len, const char *str);
571 ZEND_API void add_property_stringl_ex(zval *arg, const char *key, size_t key_len, const char *str,…
572 ZEND_API void add_property_array_ex(zval *arg, const char *key, size_t key_len, zend_array *arr);
573 ZEND_API void add_property_object_ex(zval *arg, const char *key, size_t key_len, zend_object *obj);
574 ZEND_API void add_property_reference_ex(zval *arg, const char *key, size_t key_len, zend_reference …
575 ZEND_API void add_property_zval_ex(zval *arg, const char *key, size_t key_len, zval *value);
1331 …meter_error(int error_code, uint32_t num, char *name, zend_expected_type expected_type, zval *arg);
1332 …ASTCALL zend_wrong_parameter_type_error(uint32_t num, zend_expected_type expected_type, zval *arg);
1333 …OLD void ZEND_FASTCALL zend_wrong_parameter_class_error(uint32_t num, const char *name, zval *arg);
1334 … ZEND_FASTCALL zend_wrong_parameter_class_or_null_error(uint32_t num, const char *name, zval *arg);
1335 … ZEND_FASTCALL zend_wrong_parameter_class_or_long_error(uint32_t num, const char *name, zval *arg);
1336 …STCALL zend_wrong_parameter_class_or_long_or_null_error(uint32_t num, const char *name, zval *arg);
1337 …END_FASTCALL zend_wrong_parameter_class_or_string_error(uint32_t num, const char *name, zval *arg);
1338 …CALL zend_wrong_parameter_class_or_string_or_null_error(uint32_t num, const char *name, zval *arg);
1917 ZEND_API bool ZEND_FASTCALL zend_parse_arg_class(zval *arg, zend_class_entry **pce, uint32_t num, b…
1918 ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_slow(zval *arg, bool *dest, uint32_t arg_num);
1919 ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_weak(zval *arg, bool *dest, uint32_t arg_num);
1920 ZEND_API bool ZEND_FASTCALL zend_parse_arg_long_slow(zval *arg, zend_long *dest, uint32_t arg_num);
1921 ZEND_API bool ZEND_FASTCALL zend_parse_arg_long_weak(zval *arg, zend_long *dest, uint32_t arg_num);
1922 ZEND_API bool ZEND_FASTCALL zend_parse_arg_double_slow(zval *arg, double *dest, uint32_t arg_num);
1923 ZEND_API bool ZEND_FASTCALL zend_parse_arg_double_weak(zval *arg, double *dest, uint32_t arg_num);
1924 ZEND_API bool ZEND_FASTCALL zend_parse_arg_str_slow(zval *arg, zend_string **dest, uint32_t arg_num…
1925 ZEND_API bool ZEND_FASTCALL zend_parse_arg_str_weak(zval *arg, zend_string **dest, uint32_t arg_num…
1926 ZEND_API bool ZEND_FASTCALL zend_parse_arg_number_slow(zval *arg, zval **dest, uint32_t arg_num);
1927 ZEND_API bool ZEND_FASTCALL zend_parse_arg_str_or_long_slow(zval *arg, zend_string **dest_str, zend…
1929 static zend_always_inline bool zend_parse_arg_bool(zval *arg, bool *dest, bool *is_null, bool check… in zend_parse_arg_bool() argument
1934 if (EXPECTED(Z_TYPE_P(arg) == IS_TRUE)) { in zend_parse_arg_bool()
1936 } else if (EXPECTED(Z_TYPE_P(arg) == IS_FALSE)) { in zend_parse_arg_bool()
1938 } else if (check_null && Z_TYPE_P(arg) == IS_NULL) { in zend_parse_arg_bool()
1942 return zend_parse_arg_bool_slow(arg, dest, arg_num); in zend_parse_arg_bool()
1947 static zend_always_inline bool zend_parse_arg_long(zval *arg, zend_long *dest, bool *is_null, bool … in zend_parse_arg_long() argument
1952 if (EXPECTED(Z_TYPE_P(arg) == IS_LONG)) { in zend_parse_arg_long()
1953 *dest = Z_LVAL_P(arg); in zend_parse_arg_long()
1954 } else if (check_null && Z_TYPE_P(arg) == IS_NULL) { in zend_parse_arg_long()
1958 return zend_parse_arg_long_slow(arg, dest, arg_num); in zend_parse_arg_long()
1963 static zend_always_inline bool zend_parse_arg_double(zval *arg, double *dest, bool *is_null, bool c… in zend_parse_arg_double() argument
1968 if (EXPECTED(Z_TYPE_P(arg) == IS_DOUBLE)) { in zend_parse_arg_double()
1969 *dest = Z_DVAL_P(arg); in zend_parse_arg_double()
1970 } else if (check_null && Z_TYPE_P(arg) == IS_NULL) { in zend_parse_arg_double()
1974 return zend_parse_arg_double_slow(arg, dest, arg_num); in zend_parse_arg_double()
1979 static zend_always_inline bool zend_parse_arg_number(zval *arg, zval **dest, bool check_null, uint3… in zend_parse_arg_number() argument
1981 if (EXPECTED(Z_TYPE_P(arg) == IS_LONG || Z_TYPE_P(arg) == IS_DOUBLE)) { in zend_parse_arg_number()
1982 *dest = arg; in zend_parse_arg_number()
1983 } else if (check_null && EXPECTED(Z_TYPE_P(arg) == IS_NULL)) { in zend_parse_arg_number()
1986 return zend_parse_arg_number_slow(arg, dest, arg_num); in zend_parse_arg_number()
1991 static zend_always_inline bool zend_parse_arg_str(zval *arg, zend_string **dest, bool check_null, u… in zend_parse_arg_str() argument
1993 if (EXPECTED(Z_TYPE_P(arg) == IS_STRING)) { in zend_parse_arg_str()
1994 *dest = Z_STR_P(arg); in zend_parse_arg_str()
1995 } else if (check_null && Z_TYPE_P(arg) == IS_NULL) { in zend_parse_arg_str()
1998 return zend_parse_arg_str_slow(arg, dest, arg_num); in zend_parse_arg_str()
2003 static zend_always_inline bool zend_parse_arg_string(zval *arg, char **dest, size_t *dest_len, bool… in zend_parse_arg_string() argument
2007 if (!zend_parse_arg_str(arg, &str, check_null, arg_num)) { in zend_parse_arg_string()
2020 static zend_always_inline bool zend_parse_arg_path_str(zval *arg, zend_string **dest, bool check_nu… in zend_parse_arg_path_str() argument
2022 if (!zend_parse_arg_str(arg, dest, check_null, arg_num) || in zend_parse_arg_path_str()
2029 static zend_always_inline bool zend_parse_arg_path(zval *arg, char **dest, size_t *dest_len, bool c… in zend_parse_arg_path() argument
2033 if (!zend_parse_arg_path_str(arg, &str, check_null, arg_num)) { in zend_parse_arg_path()
2046 static zend_always_inline bool zend_parse_arg_iterable(zval *arg, zval **dest, bool check_null) in zend_parse_arg_iterable() argument
2048 if (EXPECTED(zend_is_iterable(arg))) { in zend_parse_arg_iterable()
2049 *dest = arg; in zend_parse_arg_iterable()
2053 if (check_null && EXPECTED(Z_TYPE_P(arg) == IS_NULL)) { in zend_parse_arg_iterable()
2061 static zend_always_inline bool zend_parse_arg_array(zval *arg, zval **dest, bool check_null, bool o… in zend_parse_arg_array() argument
2063 if (EXPECTED(Z_TYPE_P(arg) == IS_ARRAY) || in zend_parse_arg_array()
2064 (or_object && EXPECTED(Z_TYPE_P(arg) == IS_OBJECT))) { in zend_parse_arg_array()
2065 *dest = arg; in zend_parse_arg_array()
2066 } else if (check_null && EXPECTED(Z_TYPE_P(arg) == IS_NULL)) { in zend_parse_arg_array()
2074 static zend_always_inline bool zend_parse_arg_array_ht(zval *arg, HashTable **dest, bool check_null… in zend_parse_arg_array_ht() argument
2076 if (EXPECTED(Z_TYPE_P(arg) == IS_ARRAY)) { in zend_parse_arg_array_ht()
2077 *dest = Z_ARRVAL_P(arg); in zend_parse_arg_array_ht()
2078 } else if (or_object && EXPECTED(Z_TYPE_P(arg) == IS_OBJECT)) { in zend_parse_arg_array_ht()
2079 zend_object *zobj = Z_OBJ_P(arg); in zend_parse_arg_array_ht()
2089 } else if (check_null && EXPECTED(Z_TYPE_P(arg) == IS_NULL)) { in zend_parse_arg_array_ht()
2098 …zval *arg, HashTable **dest_ht, zend_long *dest_long, bool *is_null, bool allow_null, uint32_t arg… in zend_parse_arg_array_ht_or_long() argument
2104 if (EXPECTED(Z_TYPE_P(arg) == IS_ARRAY)) { in zend_parse_arg_array_ht_or_long()
2105 *dest_ht = Z_ARRVAL_P(arg); in zend_parse_arg_array_ht_or_long()
2106 } else if (EXPECTED(Z_TYPE_P(arg) == IS_LONG)) { in zend_parse_arg_array_ht_or_long()
2108 *dest_long = Z_LVAL_P(arg); in zend_parse_arg_array_ht_or_long()
2109 } else if (allow_null && EXPECTED(Z_TYPE_P(arg) == IS_NULL)) { in zend_parse_arg_array_ht_or_long()
2114 return zend_parse_arg_long_slow(arg, dest_long, arg_num); in zend_parse_arg_array_ht_or_long()
2120 static zend_always_inline bool zend_parse_arg_object(zval *arg, zval **dest, zend_class_entry *ce, … in zend_parse_arg_object() argument
2122 if (EXPECTED(Z_TYPE_P(arg) == IS_OBJECT) && in zend_parse_arg_object()
2123 (!ce || EXPECTED(instanceof_function(Z_OBJCE_P(arg), ce) != 0))) { in zend_parse_arg_object()
2124 *dest = arg; in zend_parse_arg_object()
2125 } else if (check_null && EXPECTED(Z_TYPE_P(arg) == IS_NULL)) { in zend_parse_arg_object()
2133 static zend_always_inline bool zend_parse_arg_obj(zval *arg, zend_object **dest, zend_class_entry *… in zend_parse_arg_obj() argument
2135 if (EXPECTED(Z_TYPE_P(arg) == IS_OBJECT) && in zend_parse_arg_obj()
2136 (!ce || EXPECTED(instanceof_function(Z_OBJCE_P(arg), ce) != 0))) { in zend_parse_arg_obj()
2137 *dest = Z_OBJ_P(arg); in zend_parse_arg_obj()
2138 } else if (check_null && EXPECTED(Z_TYPE_P(arg) == IS_NULL)) { in zend_parse_arg_obj()
2147 …zval *arg, zend_object **dest_obj, zend_class_entry *ce, zend_long *dest_long, bool *is_null, bool… in zend_parse_arg_obj_or_long() argument
2153 …if (EXPECTED(Z_TYPE_P(arg) == IS_OBJECT) && EXPECTED(instanceof_function(Z_OBJCE_P(arg), ce) != 0)… in zend_parse_arg_obj_or_long()
2154 *dest_obj = Z_OBJ_P(arg); in zend_parse_arg_obj_or_long()
2155 } else if (EXPECTED(Z_TYPE_P(arg) == IS_LONG)) { in zend_parse_arg_obj_or_long()
2157 *dest_long = Z_LVAL_P(arg); in zend_parse_arg_obj_or_long()
2158 } else if (allow_null && EXPECTED(Z_TYPE_P(arg) == IS_NULL)) { in zend_parse_arg_obj_or_long()
2163 return zend_parse_arg_long_slow(arg, dest_long, arg_num); in zend_parse_arg_obj_or_long()
2169 static zend_always_inline bool zend_parse_arg_resource(zval *arg, zval **dest, bool check_null) in zend_parse_arg_resource() argument
2171 if (EXPECTED(Z_TYPE_P(arg) == IS_RESOURCE)) { in zend_parse_arg_resource()
2172 *dest = arg; in zend_parse_arg_resource()
2173 } else if (check_null && EXPECTED(Z_TYPE_P(arg) == IS_NULL)) { in zend_parse_arg_resource()
2181 static zend_always_inline bool zend_parse_arg_func(zval *arg, zend_fcall_info *dest_fci, zend_fcall… in zend_parse_arg_func() argument
2183 if (check_null && UNEXPECTED(Z_TYPE_P(arg) == IS_NULL)) { in zend_parse_arg_func()
2187 } else if (UNEXPECTED(zend_fcall_info_init(arg, 0, dest_fci, dest_fcc, NULL, error) != SUCCESS)) { in zend_parse_arg_func()
2197 static zend_always_inline void zend_parse_arg_zval(zval *arg, zval **dest, bool check_null) in zend_parse_arg_zval() argument
2200 (UNEXPECTED(Z_TYPE_P(arg) == IS_NULL) || in zend_parse_arg_zval()
2201 (UNEXPECTED(Z_ISREF_P(arg)) && in zend_parse_arg_zval()
2202 UNEXPECTED(Z_TYPE_P(Z_REFVAL_P(arg)) == IS_NULL)))) ? NULL : arg; in zend_parse_arg_zval()
2205 static zend_always_inline void zend_parse_arg_zval_deref(zval *arg, zval **dest, bool check_null) in zend_parse_arg_zval_deref() argument
2207 *dest = (check_null && UNEXPECTED(Z_TYPE_P(arg) == IS_NULL)) ? NULL : arg; in zend_parse_arg_zval_deref()
2211 zval *arg, HashTable **dest_ht, zend_string **dest_str, bool allow_null, uint32_t arg_num) in zend_parse_arg_array_ht_or_str() argument
2213 if (EXPECTED(Z_TYPE_P(arg) == IS_STRING)) { in zend_parse_arg_array_ht_or_str()
2215 *dest_str = Z_STR_P(arg); in zend_parse_arg_array_ht_or_str()
2216 } else if (EXPECTED(Z_TYPE_P(arg) == IS_ARRAY)) { in zend_parse_arg_array_ht_or_str()
2217 *dest_ht = Z_ARRVAL_P(arg); in zend_parse_arg_array_ht_or_str()
2219 } else if (allow_null && EXPECTED(Z_TYPE_P(arg) == IS_NULL)) { in zend_parse_arg_array_ht_or_str()
2224 return zend_parse_arg_str_slow(arg, dest_str, arg_num); in zend_parse_arg_array_ht_or_str()
2229 static zend_always_inline bool zend_parse_arg_str_or_long(zval *arg, zend_string **dest_str, zend_l… in zend_parse_arg_str_or_long() argument
2235 if (EXPECTED(Z_TYPE_P(arg) == IS_STRING)) { in zend_parse_arg_str_or_long()
2236 *dest_str = Z_STR_P(arg); in zend_parse_arg_str_or_long()
2237 } else if (EXPECTED(Z_TYPE_P(arg) == IS_LONG)) { in zend_parse_arg_str_or_long()
2239 *dest_long = Z_LVAL_P(arg); in zend_parse_arg_str_or_long()
2240 } else if (allow_null && EXPECTED(Z_TYPE_P(arg) == IS_NULL)) { in zend_parse_arg_str_or_long()
2244 return zend_parse_arg_str_or_long_slow(arg, dest_str, dest_long, arg_num); in zend_parse_arg_str_or_long()
2250 zval *arg, zend_class_entry **destination, bool allow_null in zend_parse_arg_obj_or_class_name() argument
2252 if (EXPECTED(Z_TYPE_P(arg) == IS_STRING)) { in zend_parse_arg_obj_or_class_name()
2253 *destination = zend_lookup_class(Z_STR_P(arg)); in zend_parse_arg_obj_or_class_name()
2256 } else if (EXPECTED(Z_TYPE_P(arg) == IS_OBJECT)) { in zend_parse_arg_obj_or_class_name()
2257 *destination = Z_OBJ_P(arg)->ce; in zend_parse_arg_obj_or_class_name()
2258 } else if (allow_null && EXPECTED(Z_TYPE_P(arg) == IS_NULL)) { in zend_parse_arg_obj_or_class_name()
2268 …zval *arg, zend_object **destination_object, zend_class_entry *base_ce, zend_string **destination_… in zend_parse_arg_obj_or_str() argument
2270 if (EXPECTED(Z_TYPE_P(arg) == IS_OBJECT)) { in zend_parse_arg_obj_or_str()
2271 if (!base_ce || EXPECTED(instanceof_function(Z_OBJCE_P(arg), base_ce))) { in zend_parse_arg_obj_or_str()
2272 *destination_object = Z_OBJ_P(arg); in zend_parse_arg_obj_or_str()
2279 return zend_parse_arg_str(arg, destination_string, allow_null, arg_num); in zend_parse_arg_obj_or_str()