Lines Matching refs:arg

309 ZEND_API const char *zend_zval_type_name(const zval *arg);
310 ZEND_API zend_string *zend_zval_get_legacy_type(const zval *arg);
315 ZEND_API zend_result zend_parse_parameter(int flags, uint32_t arg_num, zval *arg, const char *spec,…
429 #define array_init(arg) ZVAL_ARR((arg), zend_new_array(0)) argument
430 #define array_init_size(arg, size) ZVAL_ARR((arg), zend_new_array(size)) argument
431 ZEND_API void object_init(zval *arg);
432 ZEND_API zend_result object_init_ex(zval *arg, zend_class_entry *ce);
433 ZEND_API zend_result object_and_properties_init(zval *arg, zend_class_entry *ce, HashTable *propert…
440 ZEND_API void add_assoc_long_ex(zval *arg, const char *key, size_t key_len, zend_long n);
441 ZEND_API void add_assoc_null_ex(zval *arg, const char *key, size_t key_len);
442 ZEND_API void add_assoc_bool_ex(zval *arg, const char *key, size_t key_len, bool b);
443 ZEND_API void add_assoc_resource_ex(zval *arg, const char *key, size_t key_len, zend_resource *r);
444 ZEND_API void add_assoc_double_ex(zval *arg, const char *key, size_t key_len, double d);
445 ZEND_API void add_assoc_str_ex(zval *arg, const char *key, size_t key_len, zend_string *str);
446 ZEND_API void add_assoc_string_ex(zval *arg, const char *key, size_t key_len, const char *str);
447 ZEND_API void add_assoc_stringl_ex(zval *arg, const char *key, size_t key_len, const char *str, siz…
448 ZEND_API void add_assoc_zval_ex(zval *arg, const char *key, size_t key_len, zval *value);
460 ZEND_API void add_index_long(zval *arg, zend_ulong index, zend_long n);
461 ZEND_API void add_index_null(zval *arg, zend_ulong index);
462 ZEND_API void add_index_bool(zval *arg, zend_ulong index, bool b);
463 ZEND_API void add_index_resource(zval *arg, zend_ulong index, zend_resource *r);
464 ZEND_API void add_index_double(zval *arg, zend_ulong index, double d);
465 ZEND_API void add_index_str(zval *arg, zend_ulong index, zend_string *str);
466 ZEND_API void add_index_string(zval *arg, zend_ulong index, const char *str);
467 ZEND_API void add_index_stringl(zval *arg, zend_ulong index, const char *str, size_t length);
469 static zend_always_inline zend_result add_index_zval(zval *arg, zend_ulong index, zval *value) in add_index_zval() argument
471 return zend_hash_index_update(Z_ARRVAL_P(arg), index, value) ? SUCCESS : FAILURE; in add_index_zval()
474 ZEND_API zend_result add_next_index_long(zval *arg, zend_long n);
475 ZEND_API zend_result add_next_index_null(zval *arg);
476 ZEND_API zend_result add_next_index_bool(zval *arg, zend_bool b);
477 ZEND_API zend_result add_next_index_resource(zval *arg, zend_resource *r);
478 ZEND_API zend_result add_next_index_double(zval *arg, double d);
479 ZEND_API zend_result add_next_index_str(zval *arg, zend_string *str);
480 ZEND_API zend_result add_next_index_string(zval *arg, const char *str);
481 ZEND_API zend_result add_next_index_stringl(zval *arg, const char *str, size_t length);
483 static zend_always_inline zend_result add_next_index_zval(zval *arg, zval *value) in add_next_index_zval() argument
485 return zend_hash_next_index_insert(Z_ARRVAL_P(arg), value) ? SUCCESS : FAILURE; in add_next_index_zval()
490 ZEND_API void add_property_long_ex(zval *arg, const char *key, size_t key_len, zend_long l);
491 ZEND_API void add_property_null_ex(zval *arg, const char *key, size_t key_len);
492 ZEND_API void add_property_bool_ex(zval *arg, const char *key, size_t key_len, zend_long b);
493 ZEND_API void add_property_resource_ex(zval *arg, const char *key, size_t key_len, zend_resource *r…
494 ZEND_API void add_property_double_ex(zval *arg, const char *key, size_t key_len, double d);
495 ZEND_API void add_property_str_ex(zval *arg, const char *key, size_t key_len, zend_string *str);
496 ZEND_API void add_property_string_ex(zval *arg, const char *key, size_t key_len, const char *str);
497 ZEND_API void add_property_stringl_ex(zval *arg, const char *key, size_t key_len, const char *str,…
498 ZEND_API void add_property_zval_ex(zval *arg, const char *key, size_t key_len, zval *value);
1249 …meter_error(int error_code, uint32_t num, char *name, zend_expected_type expected_type, zval *arg);
1250 …ASTCALL zend_wrong_parameter_type_error(uint32_t num, zend_expected_type expected_type, zval *arg);
1251 …OLD void ZEND_FASTCALL zend_wrong_parameter_class_error(uint32_t num, const char *name, zval *arg);
1252 … ZEND_FASTCALL zend_wrong_parameter_class_or_null_error(uint32_t num, const char *name, zval *arg);
1253 … ZEND_FASTCALL zend_wrong_parameter_class_or_long_error(uint32_t num, const char *name, zval *arg);
1254 …STCALL zend_wrong_parameter_class_or_long_or_null_error(uint32_t num, const char *name, zval *arg);
1255 …END_FASTCALL zend_wrong_parameter_class_or_string_error(uint32_t num, const char *name, zval *arg);
1256 …CALL zend_wrong_parameter_class_or_string_or_null_error(uint32_t num, const char *name, zval *arg);
1874 ZEND_API bool ZEND_FASTCALL zend_parse_arg_class(zval *arg, zend_class_entry **pce, uint32_t num, b…
1875 ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_slow(zval *arg, zend_bool *dest);
1876 ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_weak(zval *arg, zend_bool *dest);
1877 ZEND_API bool ZEND_FASTCALL zend_parse_arg_long_slow(zval *arg, zend_long *dest);
1878 ZEND_API bool ZEND_FASTCALL zend_parse_arg_long_weak(zval *arg, zend_long *dest);
1879 ZEND_API bool ZEND_FASTCALL zend_parse_arg_double_slow(zval *arg, double *dest);
1880 ZEND_API bool ZEND_FASTCALL zend_parse_arg_double_weak(zval *arg, double *dest);
1881 ZEND_API bool ZEND_FASTCALL zend_parse_arg_str_slow(zval *arg, zend_string **dest);
1882 ZEND_API bool ZEND_FASTCALL zend_parse_arg_str_weak(zval *arg, zend_string **dest);
1883 ZEND_API bool ZEND_FASTCALL zend_parse_arg_number_slow(zval *arg, zval **dest);
1884 ZEND_API bool ZEND_FASTCALL zend_parse_arg_str_or_long_slow(zval *arg, zend_string **dest_str, zend…
1886 static zend_always_inline bool zend_parse_arg_bool(zval *arg, zend_bool *dest, zend_bool *is_null, … in zend_parse_arg_bool() argument
1891 if (EXPECTED(Z_TYPE_P(arg) == IS_TRUE)) { in zend_parse_arg_bool()
1893 } else if (EXPECTED(Z_TYPE_P(arg) == IS_FALSE)) { in zend_parse_arg_bool()
1895 } else if (check_null && Z_TYPE_P(arg) == IS_NULL) { in zend_parse_arg_bool()
1899 return zend_parse_arg_bool_slow(arg, dest); in zend_parse_arg_bool()
1904 static zend_always_inline bool zend_parse_arg_long(zval *arg, zend_long *dest, zend_bool *is_null, … in zend_parse_arg_long() argument
1909 if (EXPECTED(Z_TYPE_P(arg) == IS_LONG)) { in zend_parse_arg_long()
1910 *dest = Z_LVAL_P(arg); in zend_parse_arg_long()
1911 } else if (check_null && Z_TYPE_P(arg) == IS_NULL) { in zend_parse_arg_long()
1915 return zend_parse_arg_long_slow(arg, dest); in zend_parse_arg_long()
1920 static zend_always_inline bool zend_parse_arg_double(zval *arg, double *dest, zend_bool *is_null, b… in zend_parse_arg_double() argument
1925 if (EXPECTED(Z_TYPE_P(arg) == IS_DOUBLE)) { in zend_parse_arg_double()
1926 *dest = Z_DVAL_P(arg); in zend_parse_arg_double()
1927 } else if (check_null && Z_TYPE_P(arg) == IS_NULL) { in zend_parse_arg_double()
1931 return zend_parse_arg_double_slow(arg, dest); in zend_parse_arg_double()
1936 static zend_always_inline bool zend_parse_arg_number(zval *arg, zval **dest, bool check_null) in zend_parse_arg_number() argument
1938 if (EXPECTED(Z_TYPE_P(arg) == IS_LONG || Z_TYPE_P(arg) == IS_DOUBLE)) { in zend_parse_arg_number()
1939 *dest = arg; in zend_parse_arg_number()
1940 } else if (check_null && EXPECTED(Z_TYPE_P(arg) == IS_NULL)) { in zend_parse_arg_number()
1943 return zend_parse_arg_number_slow(arg, dest); in zend_parse_arg_number()
1948 static zend_always_inline bool zend_parse_arg_str(zval *arg, zend_string **dest, bool check_null) in zend_parse_arg_str() argument
1950 if (EXPECTED(Z_TYPE_P(arg) == IS_STRING)) { in zend_parse_arg_str()
1951 *dest = Z_STR_P(arg); in zend_parse_arg_str()
1952 } else if (check_null && Z_TYPE_P(arg) == IS_NULL) { in zend_parse_arg_str()
1955 return zend_parse_arg_str_slow(arg, dest); in zend_parse_arg_str()
1960 static zend_always_inline bool zend_parse_arg_string(zval *arg, char **dest, size_t *dest_len, bool… in zend_parse_arg_string() argument
1964 if (!zend_parse_arg_str(arg, &str, check_null)) { in zend_parse_arg_string()
1977 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
1979 if (!zend_parse_arg_str(arg, dest, check_null) || in zend_parse_arg_path_str()
1986 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
1990 if (!zend_parse_arg_path_str(arg, &str, check_null)) { in zend_parse_arg_path()
2003 static zend_always_inline bool zend_parse_arg_iterable(zval *arg, zval **dest, bool check_null) in zend_parse_arg_iterable() argument
2005 if (EXPECTED(zend_is_iterable(arg))) { in zend_parse_arg_iterable()
2006 *dest = arg; in zend_parse_arg_iterable()
2010 if (check_null && EXPECTED(Z_TYPE_P(arg) == IS_NULL)) { in zend_parse_arg_iterable()
2018 static zend_always_inline bool zend_parse_arg_array(zval *arg, zval **dest, bool check_null, bool o… in zend_parse_arg_array() argument
2020 if (EXPECTED(Z_TYPE_P(arg) == IS_ARRAY) || in zend_parse_arg_array()
2021 (or_object && EXPECTED(Z_TYPE_P(arg) == IS_OBJECT))) { in zend_parse_arg_array()
2022 *dest = arg; in zend_parse_arg_array()
2023 } else if (check_null && EXPECTED(Z_TYPE_P(arg) == IS_NULL)) { in zend_parse_arg_array()
2031 static zend_always_inline bool zend_parse_arg_array_ht(zval *arg, HashTable **dest, bool check_null… in zend_parse_arg_array_ht() argument
2033 if (EXPECTED(Z_TYPE_P(arg) == IS_ARRAY)) { in zend_parse_arg_array_ht()
2034 *dest = Z_ARRVAL_P(arg); in zend_parse_arg_array_ht()
2035 } else if (or_object && EXPECTED(Z_TYPE_P(arg) == IS_OBJECT)) { in zend_parse_arg_array_ht()
2036 zend_object *zobj = Z_OBJ_P(arg); in zend_parse_arg_array_ht()
2046 } else if (check_null && EXPECTED(Z_TYPE_P(arg) == IS_NULL)) { in zend_parse_arg_array_ht()
2055 zval *arg, HashTable **dest_ht, zend_long *dest_long, zend_bool *is_null, bool allow_null in zend_parse_arg_array_ht_or_long() argument
2061 if (EXPECTED(Z_TYPE_P(arg) == IS_ARRAY)) { in zend_parse_arg_array_ht_or_long()
2062 *dest_ht = Z_ARRVAL_P(arg); in zend_parse_arg_array_ht_or_long()
2063 } else if (EXPECTED(Z_TYPE_P(arg) == IS_LONG)) { in zend_parse_arg_array_ht_or_long()
2065 *dest_long = Z_LVAL_P(arg); in zend_parse_arg_array_ht_or_long()
2066 } else if (allow_null && EXPECTED(Z_TYPE_P(arg) == IS_NULL)) { in zend_parse_arg_array_ht_or_long()
2071 return zend_parse_arg_long_slow(arg, dest_long); in zend_parse_arg_array_ht_or_long()
2077 static zend_always_inline bool zend_parse_arg_object(zval *arg, zval **dest, zend_class_entry *ce, … in zend_parse_arg_object() argument
2079 if (EXPECTED(Z_TYPE_P(arg) == IS_OBJECT) && in zend_parse_arg_object()
2080 (!ce || EXPECTED(instanceof_function(Z_OBJCE_P(arg), ce) != 0))) { in zend_parse_arg_object()
2081 *dest = arg; in zend_parse_arg_object()
2082 } else if (check_null && EXPECTED(Z_TYPE_P(arg) == IS_NULL)) { in zend_parse_arg_object()
2090 static zend_always_inline bool zend_parse_arg_obj(zval *arg, zend_object **dest, zend_class_entry *… in zend_parse_arg_obj() argument
2092 if (EXPECTED(Z_TYPE_P(arg) == IS_OBJECT) && in zend_parse_arg_obj()
2093 (!ce || EXPECTED(instanceof_function(Z_OBJCE_P(arg), ce) != 0))) { in zend_parse_arg_obj()
2094 *dest = Z_OBJ_P(arg); in zend_parse_arg_obj()
2095 } else if (check_null && EXPECTED(Z_TYPE_P(arg) == IS_NULL)) { in zend_parse_arg_obj()
2104 …zval *arg, zend_object **dest_obj, zend_class_entry *ce, zend_long *dest_long, zend_bool *is_null,… in zend_parse_arg_obj_or_long() argument
2110 …if (EXPECTED(Z_TYPE_P(arg) == IS_OBJECT) && EXPECTED(instanceof_function(Z_OBJCE_P(arg), ce) != 0)… in zend_parse_arg_obj_or_long()
2111 *dest_obj = Z_OBJ_P(arg); in zend_parse_arg_obj_or_long()
2112 } else if (EXPECTED(Z_TYPE_P(arg) == IS_LONG)) { in zend_parse_arg_obj_or_long()
2114 *dest_long = Z_LVAL_P(arg); in zend_parse_arg_obj_or_long()
2115 } else if (allow_null && EXPECTED(Z_TYPE_P(arg) == IS_NULL)) { in zend_parse_arg_obj_or_long()
2120 return zend_parse_arg_long_slow(arg, dest_long); in zend_parse_arg_obj_or_long()
2126 static zend_always_inline bool zend_parse_arg_resource(zval *arg, zval **dest, bool check_null) in zend_parse_arg_resource() argument
2128 if (EXPECTED(Z_TYPE_P(arg) == IS_RESOURCE)) { in zend_parse_arg_resource()
2129 *dest = arg; in zend_parse_arg_resource()
2130 } else if (check_null && EXPECTED(Z_TYPE_P(arg) == IS_NULL)) { in zend_parse_arg_resource()
2138 static zend_always_inline bool zend_parse_arg_func(zval *arg, zend_fcall_info *dest_fci, zend_fcall… in zend_parse_arg_func() argument
2140 if (check_null && UNEXPECTED(Z_TYPE_P(arg) == IS_NULL)) { in zend_parse_arg_func()
2144 } else if (UNEXPECTED(zend_fcall_info_init(arg, 0, dest_fci, dest_fcc, NULL, error) != SUCCESS)) { in zend_parse_arg_func()
2154 static zend_always_inline void zend_parse_arg_zval(zval *arg, zval **dest, bool check_null) in zend_parse_arg_zval() argument
2157 (UNEXPECTED(Z_TYPE_P(arg) == IS_NULL) || in zend_parse_arg_zval()
2158 (UNEXPECTED(Z_ISREF_P(arg)) && in zend_parse_arg_zval()
2159 UNEXPECTED(Z_TYPE_P(Z_REFVAL_P(arg)) == IS_NULL)))) ? NULL : arg; in zend_parse_arg_zval()
2162 static zend_always_inline void zend_parse_arg_zval_deref(zval *arg, zval **dest, bool check_null) in zend_parse_arg_zval_deref() argument
2164 *dest = (check_null && UNEXPECTED(Z_TYPE_P(arg) == IS_NULL)) ? NULL : arg; in zend_parse_arg_zval_deref()
2168 zval *arg, HashTable **dest_ht, zend_string **dest_str, bool allow_null) in zend_parse_arg_array_ht_or_str() argument
2170 if (EXPECTED(Z_TYPE_P(arg) == IS_STRING)) { in zend_parse_arg_array_ht_or_str()
2172 *dest_str = Z_STR_P(arg); in zend_parse_arg_array_ht_or_str()
2173 } else if (EXPECTED(Z_TYPE_P(arg) == IS_ARRAY)) { in zend_parse_arg_array_ht_or_str()
2174 *dest_ht = Z_ARRVAL_P(arg); in zend_parse_arg_array_ht_or_str()
2176 } else if (allow_null && EXPECTED(Z_TYPE_P(arg) == IS_NULL)) { in zend_parse_arg_array_ht_or_str()
2181 return zend_parse_arg_str_slow(arg, dest_str); in zend_parse_arg_array_ht_or_str()
2186 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
2192 if (EXPECTED(Z_TYPE_P(arg) == IS_STRING)) { in zend_parse_arg_str_or_long()
2193 *dest_str = Z_STR_P(arg); in zend_parse_arg_str_or_long()
2194 } else if (EXPECTED(Z_TYPE_P(arg) == IS_LONG)) { in zend_parse_arg_str_or_long()
2196 *dest_long = Z_LVAL_P(arg); in zend_parse_arg_str_or_long()
2197 } else if (allow_null && EXPECTED(Z_TYPE_P(arg) == IS_NULL)) { in zend_parse_arg_str_or_long()
2201 return zend_parse_arg_str_or_long_slow(arg, dest_str, dest_long); in zend_parse_arg_str_or_long()
2207 zval *arg, zend_class_entry **destination, bool allow_null in zend_parse_arg_obj_or_class_name() argument
2209 if (EXPECTED(Z_TYPE_P(arg) == IS_STRING)) { in zend_parse_arg_obj_or_class_name()
2210 *destination = zend_lookup_class(Z_STR_P(arg)); in zend_parse_arg_obj_or_class_name()
2213 } else if (EXPECTED(Z_TYPE_P(arg) == IS_OBJECT)) { in zend_parse_arg_obj_or_class_name()
2214 *destination = Z_OBJ_P(arg)->ce; in zend_parse_arg_obj_or_class_name()
2215 } else if (allow_null && EXPECTED(Z_TYPE_P(arg) == IS_NULL)) { in zend_parse_arg_obj_or_class_name()
2225 …zval *arg, zend_object **destination_object, zend_class_entry *base_ce, zend_string **destination_… in zend_parse_arg_obj_or_str() argument
2227 if (EXPECTED(Z_TYPE_P(arg) == IS_OBJECT)) { in zend_parse_arg_obj_or_str()
2228 if (!base_ce || EXPECTED(instanceof_function(Z_OBJCE_P(arg), base_ce))) { in zend_parse_arg_obj_or_str()
2229 *destination_object = Z_OBJ_P(arg); in zend_parse_arg_obj_or_str()
2236 return zend_parse_arg_str(arg, destination_string, allow_null); in zend_parse_arg_obj_or_str()