Coverage Report

Created: 2026-06-02 06:36

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/php-src/Zend/zend.h
Line
Count
Source
1
/*
2
   +----------------------------------------------------------------------+
3
   | Zend Engine                                                          |
4
   +----------------------------------------------------------------------+
5
   | Copyright © Zend Technologies Ltd., a subsidiary company of          |
6
   |     Perforce Software, Inc., and Contributors.                       |
7
   +----------------------------------------------------------------------+
8
   | This source file is subject to the Modified BSD License that is      |
9
   | bundled with this package in the file LICENSE, and is available      |
10
   | through the World Wide Web at <https://www.php.net/license/>.        |
11
   |                                                                      |
12
   | SPDX-License-Identifier: BSD-3-Clause                                |
13
   +----------------------------------------------------------------------+
14
   | Authors: Andi Gutmans <andi@php.net>                                 |
15
   |          Zeev Suraski <zeev@php.net>                                 |
16
   +----------------------------------------------------------------------+
17
*/
18
19
#ifndef ZEND_H
20
#define ZEND_H
21
22
#define ZEND_VERSION "4.6.0-dev"
23
24
#define ZEND_ENGINE_3
25
26
#include "zend_types.h"
27
#include "zend_map_ptr.h"
28
#include "zend_errors.h"
29
#include "zend_alloc.h"
30
#include "zend_llist.h"
31
#include "zend_string.h"
32
#include "zend_hash.h"
33
#include "zend_ast.h"
34
#include "zend_gc.h"
35
#include "zend_variables.h"
36
#include "zend_iterators.h"
37
#include "zend_stream.h"
38
#include "zend_smart_str_public.h"
39
#include "zend_smart_string_public.h"
40
#include "zend_signal.h"
41
#include "zend_max_execution_timer.h"
42
43
#define zend_sprintf sprintf
44
45
6.78k
#define HANDLE_BLOCK_INTERRUPTIONS()    ZEND_SIGNAL_BLOCK_INTERRUPTIONS()
46
6.78k
#define HANDLE_UNBLOCK_INTERRUPTIONS()    ZEND_SIGNAL_UNBLOCK_INTERRUPTIONS()
47
48
#define INTERNAL_FUNCTION_PARAMETERS zend_execute_data *execute_data, zval *return_value
49
0
#define INTERNAL_FUNCTION_PARAM_PASSTHRU execute_data, return_value
50
51
#define USED_RET() \
52
0
  (!EX(prev_execute_data) || \
53
0
   !ZEND_USER_CODE(EX(prev_execute_data)->func->common.type) || \
54
0
   (EX(prev_execute_data)->opline->result_type != IS_UNUSED))
55
56
#ifdef ZEND_ENABLE_STATIC_TSRMLS_CACHE
57
#define ZEND_TSRMG TSRMG_STATIC
58
#define ZEND_TSRMG_FAST TSRMG_FAST_STATIC
59
#define ZEND_TSRMLS_CACHE_EXTERN() TSRMLS_CACHE_EXTERN()
60
#define ZEND_TSRMLS_CACHE_DEFINE() TSRMLS_CACHE_DEFINE()
61
#define ZEND_TSRMLS_CACHE_UPDATE() TSRMLS_CACHE_UPDATE()
62
#define ZEND_TSRMLS_CACHE TSRMLS_CACHE
63
#else
64
#define ZEND_TSRMG TSRMG
65
#define ZEND_TSRMG_FAST TSRMG_FAST
66
#define ZEND_TSRMLS_CACHE_EXTERN()
67
#define ZEND_TSRMLS_CACHE_DEFINE()
68
#define ZEND_TSRMLS_CACHE_UPDATE()
69
#define ZEND_TSRMLS_CACHE
70
#endif
71
72
#ifndef ZEND_COMPILE_DL_EXT
73
TSRMLS_MAIN_CACHE_EXTERN()
74
#else
75
ZEND_TSRMLS_CACHE_EXTERN()
76
#endif
77
78
struct _zend_serialize_data;
79
struct _zend_unserialize_data;
80
81
typedef struct _zend_serialize_data zend_serialize_data;
82
typedef struct _zend_unserialize_data zend_unserialize_data;
83
84
typedef struct _zend_class_name {
85
  zend_string *name;
86
  zend_string *lc_name;
87
} zend_class_name;
88
89
typedef struct _zend_trait_method_reference {
90
  zend_string *method_name;
91
  zend_string *class_name;
92
} zend_trait_method_reference;
93
94
typedef struct _zend_trait_precedence {
95
  zend_trait_method_reference trait_method;
96
  uint32_t num_excludes;
97
  zend_string *exclude_class_names[1];
98
} zend_trait_precedence;
99
100
typedef struct _zend_trait_alias {
101
  zend_trait_method_reference trait_method;
102
103
  /**
104
  * name for method to be added
105
  */
106
  zend_string *alias;
107
108
  /**
109
  * modifiers to be set on trait method
110
  */
111
  uint32_t modifiers;
112
} zend_trait_alias;
113
114
typedef struct _zend_class_mutable_data {
115
  zval      *default_properties_table;
116
  HashTable *constants_table;
117
  uint32_t   ce_flags;
118
  HashTable *backed_enum_table;
119
} zend_class_mutable_data;
120
121
typedef struct _zend_class_dependency {
122
  zend_string      *name;
123
  zend_class_entry *ce;
124
} zend_class_dependency;
125
126
typedef struct _zend_inheritance_cache_entry zend_inheritance_cache_entry;
127
128
typedef struct _zend_error_info {
129
  int type;
130
  uint32_t lineno;
131
  zend_string *filename;
132
  zend_string *message;
133
} zend_error_info;
134
135
struct _zend_inheritance_cache_entry {
136
  zend_inheritance_cache_entry *next;
137
  zend_class_entry             *ce;
138
  zend_class_entry             *parent;
139
  zend_class_dependency        *dependencies;
140
  uint32_t                      dependencies_count;
141
  uint32_t                      num_warnings;
142
  zend_error_info             **warnings;
143
  zend_class_entry             *traits_and_interfaces[1];
144
};
145
146
C23_ENUM(zend_class_type, uint8_t) {
147
  ZEND_INTERNAL_CLASS = 1,
148
  ZEND_USER_CLASS = 2,
149
};
150
151
struct _zend_class_entry {
152
  zend_class_type type;
153
  zend_string *name;
154
  /* class_entry or string depending on ZEND_ACC_LINKED */
155
  union {
156
    zend_class_entry *parent;
157
    zend_string *parent_name;
158
  };
159
  uint32_t refcount;
160
  uint32_t ce_flags;
161
  uint32_t ce_flags2;
162
163
  int default_properties_count;
164
  uint32_t default_static_members_count;
165
  zval *default_properties_table;
166
  zval *default_static_members_table;
167
  ZEND_MAP_PTR_DEF(zval *, static_members_table);
168
  HashTable function_table;
169
  HashTable properties_info;
170
  HashTable constants_table;
171
172
  ZEND_MAP_PTR_DEF(zend_class_mutable_data*, mutable_data);
173
  zend_inheritance_cache_entry *inheritance_cache;
174
175
  struct _zend_property_info **properties_info_table;
176
177
  zend_function *constructor;
178
  zend_function *destructor;
179
  zend_function *clone;
180
  zend_function *__get;
181
  zend_function *__set;
182
  zend_function *__unset;
183
  zend_function *__isset;
184
  zend_function *__call;
185
  zend_function *__callstatic;
186
  zend_function *__tostring;
187
  zend_function *__debugInfo;
188
  zend_function *__serialize;
189
  zend_function *__unserialize;
190
191
  const zend_object_handlers *default_object_handlers;
192
193
  /* allocated only if class implements Iterator or IteratorAggregate interface */
194
  zend_class_iterator_funcs *iterator_funcs_ptr;
195
  /* allocated only if class implements ArrayAccess interface */
196
  zend_class_arrayaccess_funcs *arrayaccess_funcs_ptr;
197
198
  /* handlers */
199
  union {
200
    zend_object* (*create_object)(zend_class_entry *class_type);
201
    int (*interface_gets_implemented)(zend_class_entry *iface, zend_class_entry *class_type); /* a class implements this interface */
202
  };
203
  zend_object_iterator *(*get_iterator)(zend_class_entry *ce, zval *object, int by_ref);
204
  zend_function *(*get_static_method)(zend_class_entry *ce, zend_string* method);
205
206
  /* serializer callbacks */
207
  int (*serialize)(zval *object, unsigned char **buffer, size_t *buf_len, zend_serialize_data *data);
208
  int (*unserialize)(zval *object, zend_class_entry *ce, const unsigned char *buf, size_t buf_len, zend_unserialize_data *data);
209
210
  uint32_t num_interfaces;
211
  uint32_t num_traits;
212
  uint32_t num_hooked_props;
213
  uint32_t num_hooked_prop_variance_checks;
214
215
  /* class_entry or string(s) depending on ZEND_ACC_LINKED */
216
  union {
217
    zend_class_entry **interfaces;
218
    zend_class_name *interface_names;
219
  };
220
221
  zend_class_name *trait_names;
222
  zend_trait_alias **trait_aliases;
223
  zend_trait_precedence **trait_precedences;
224
  HashTable *attributes;
225
226
  uint32_t enum_backing_type;
227
  HashTable *backed_enum_table;
228
229
  zend_string *doc_comment;
230
231
  union {
232
    struct {
233
      zend_string *filename;
234
      uint32_t line_start;
235
      uint32_t line_end;
236
    } user;
237
    struct {
238
      const struct _zend_function_entry *builtin_functions;
239
      struct _zend_module_entry *module;
240
    } internal;
241
  } info;
242
};
243
244
typedef union {
245
  zend_max_align_t align;
246
  uint64_t opaque[5];
247
} zend_random_bytes_insecure_state;
248
249
typedef struct _zend_utility_functions {
250
  void (*error_function)(int type, zend_string *error_filename, const uint32_t error_lineno, zend_string *message);
251
  size_t (*printf_function)(const char *format, ...) ZEND_ATTRIBUTE_PTR_FORMAT(printf, 1, 2);
252
  size_t (*write_function)(const char *str, size_t str_length);
253
  FILE *(*fopen_function)(zend_string *filename, zend_string **opened_path);
254
  void (*message_handler)(zend_long message, const void *data);
255
  zval *(*get_configuration_directive)(zend_string *name);
256
  void (*ticks_function)(int ticks);
257
  void (*on_timeout)(int seconds);
258
  zend_result (*stream_open_function)(zend_file_handle *handle);
259
  void (*printf_to_smart_string_function)(smart_string *buf, const char *format, va_list ap);
260
  void (*printf_to_smart_str_function)(smart_str *buf, const char *format, va_list ap);
261
  char *(*getenv_function)(const char *name, size_t name_len);
262
  zend_string *(*resolve_path_function)(zend_string *filename);
263
  zend_result (*random_bytes_function)(void *bytes, size_t size, char *errstr, size_t errstr_size);
264
  void (*random_bytes_insecure_function)(zend_random_bytes_insecure_state *state, void *bytes, size_t size);
265
} zend_utility_functions;
266
267
typedef struct _zend_utility_values {
268
  bool html_errors;
269
} zend_utility_values;
270
271
typedef size_t (*zend_write_func_t)(const char *str, size_t str_length);
272
273
0
#define zend_bailout()    _zend_bailout(__FILE__, __LINE__)
274
275
#define zend_try                        \
276
149k
  {                             \
277
149k
    JMP_BUF *__orig_bailout = EG(bailout);          \
278
149k
    JMP_BUF __bailout;                   \
279
149k
                                \
280
149k
    EG(bailout) = &__bailout;               \
281
149k
    if (SETJMP(__bailout)==0) {
282
#define zend_catch                        \
283
20.3k
      ZEND_ASSERT(EG(bailout) == &__bailout);        \
284
0
    } else {                       \
285
0
      ZEND_ASSERT(EG(bailout) == &__bailout);        \
286
0
      EG(bailout) = __orig_bailout;
287
#define zend_end_try()                      \
288
128k
    }                            \
289
149k
    EG(bailout) = __orig_bailout;             \
290
20.3k
  }
291
0
#define zend_first_try    EG(bailout)=NULL; zend_try
292
293
BEGIN_EXTERN_C()
294
void zend_startup(zend_utility_functions *utility_functions);
295
void zend_shutdown(void);
296
void zend_register_standard_ini_entries(void);
297
zend_result zend_post_startup(void);
298
void zend_set_utility_values(zend_utility_values *utility_values);
299
void zend_unload_modules(void);
300
301
ZEND_API ZEND_COLD ZEND_NORETURN void _zend_bailout(const char *filename, uint32_t lineno);
302
ZEND_API size_t zend_get_page_size(void);
303
304
ZEND_API size_t zend_vspprintf(char **pbuf, size_t max_len, const char *format, va_list ap);
305
ZEND_API size_t zend_spprintf(char **message, size_t max_len, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 3, 4);
306
ZEND_API zend_string *zend_vstrpprintf(size_t max_len, const char *format, va_list ap);
307
ZEND_API zend_string *zend_strpprintf(size_t max_len, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3);
308
309
/* Same as zend_spprintf and zend_strpprintf, without checking of format validity.
310
 * For use with custom printf specifiers such as %H. */
311
ZEND_API size_t zend_spprintf_unchecked(char **message, size_t max_len, const char *format, ...);
312
ZEND_API zend_string *zend_strpprintf_unchecked(size_t max_len, const char *format, ...);
313
314
ZEND_API const char *get_zend_version(void);
315
ZEND_API bool zend_make_printable_zval(zval *expr, zval *expr_copy);
316
ZEND_API size_t zend_print_zval(zval *expr, int indent);
317
ZEND_API void zend_print_zval_r(zval *expr, int indent);
318
ZEND_API zend_string *zend_print_zval_r_to_str(zval *expr, int indent);
319
ZEND_API void zend_print_flat_zval_r(zval *expr);
320
void zend_print_flat_zval_r_to_buf(smart_str *str, zval *expr);
321
322
0
static zend_always_inline size_t zend_print_variable(zval *var) {
323
0
  return zend_print_zval(var, 0);
324
0
}
Unexecuted instantiation: php_date.c:zend_print_variable
Unexecuted instantiation: astro.c:zend_print_variable
Unexecuted instantiation: dow.c:zend_print_variable
Unexecuted instantiation: parse_date.c:zend_print_variable
Unexecuted instantiation: parse_tz.c:zend_print_variable
Unexecuted instantiation: parse_posix.c:zend_print_variable
Unexecuted instantiation: timelib.c:zend_print_variable
Unexecuted instantiation: tm2unixtime.c:zend_print_variable
Unexecuted instantiation: unixtime2tm.c:zend_print_variable
Unexecuted instantiation: parse_iso_intervals.c:zend_print_variable
Unexecuted instantiation: interval.c:zend_print_variable
Unexecuted instantiation: php_pcre.c:zend_print_variable
Unexecuted instantiation: exif.c:zend_print_variable
Unexecuted instantiation: hash_adler32.c:zend_print_variable
Unexecuted instantiation: hash_crc32.c:zend_print_variable
Unexecuted instantiation: hash_fnv.c:zend_print_variable
Unexecuted instantiation: hash_gost.c:zend_print_variable
Unexecuted instantiation: hash_haval.c:zend_print_variable
Unexecuted instantiation: hash_joaat.c:zend_print_variable
Unexecuted instantiation: hash_md.c:zend_print_variable
Unexecuted instantiation: hash_murmur.c:zend_print_variable
Unexecuted instantiation: hash_ripemd.c:zend_print_variable
Unexecuted instantiation: hash_sha_ni.c:zend_print_variable
Unexecuted instantiation: hash_sha_sse2.c:zend_print_variable
Unexecuted instantiation: hash_sha.c:zend_print_variable
Unexecuted instantiation: hash_sha3.c:zend_print_variable
Unexecuted instantiation: hash_snefru.c:zend_print_variable
Unexecuted instantiation: hash_tiger.c:zend_print_variable
Unexecuted instantiation: hash_whirlpool.c:zend_print_variable
Unexecuted instantiation: hash_xxhash.c:zend_print_variable
Unexecuted instantiation: hash.c:zend_print_variable
Unexecuted instantiation: json_encoder.c:zend_print_variable
Unexecuted instantiation: json_parser.tab.c:zend_print_variable
Unexecuted instantiation: json_scanner.c:zend_print_variable
Unexecuted instantiation: json.c:zend_print_variable
Unexecuted instantiation: php_lexbor.c:zend_print_variable
Unexecuted instantiation: shared_alloc_mmap.c:zend_print_variable
Unexecuted instantiation: shared_alloc_posix.c:zend_print_variable
Unexecuted instantiation: shared_alloc_shm.c:zend_print_variable
Unexecuted instantiation: zend_accelerator_api.c:zend_print_variable
Unexecuted instantiation: zend_accelerator_blacklist.c:zend_print_variable
Unexecuted instantiation: zend_accelerator_debug.c:zend_print_variable
Unexecuted instantiation: zend_accelerator_hash.c:zend_print_variable
Unexecuted instantiation: zend_accelerator_module.c:zend_print_variable
Unexecuted instantiation: zend_accelerator_util_funcs.c:zend_print_variable
Unexecuted instantiation: zend_file_cache.c:zend_print_variable
Unexecuted instantiation: zend_persist_calc.c:zend_print_variable
Unexecuted instantiation: zend_persist.c:zend_print_variable
Unexecuted instantiation: zend_shared_alloc.c:zend_print_variable
Unexecuted instantiation: ZendAccelerator.c:zend_print_variable
Unexecuted instantiation: ir_cfg.c:zend_print_variable
Unexecuted instantiation: ir_check.c:zend_print_variable
Unexecuted instantiation: ir_dump.c:zend_print_variable
Unexecuted instantiation: ir_emit.c:zend_print_variable
Unexecuted instantiation: ir_gcm.c:zend_print_variable
Unexecuted instantiation: ir_gdb.c:zend_print_variable
Unexecuted instantiation: ir_patch.c:zend_print_variable
Unexecuted instantiation: ir_perf.c:zend_print_variable
Unexecuted instantiation: ir_ra.c:zend_print_variable
Unexecuted instantiation: ir_save.c:zend_print_variable
Unexecuted instantiation: ir_sccp.c:zend_print_variable
Unexecuted instantiation: ir_strtab.c:zend_print_variable
Unexecuted instantiation: ir.c:zend_print_variable
Unexecuted instantiation: zend_jit_vm_helpers.c:zend_print_variable
Unexecuted instantiation: zend_jit.c:zend_print_variable
Unexecuted instantiation: csprng.c:zend_print_variable
Unexecuted instantiation: engine_mt19937.c:zend_print_variable
Unexecuted instantiation: engine_pcgoneseq128xslrr64.c:zend_print_variable
Unexecuted instantiation: engine_secure.c:zend_print_variable
Unexecuted instantiation: engine_user.c:zend_print_variable
Unexecuted instantiation: engine_xoshiro256starstar.c:zend_print_variable
Unexecuted instantiation: gammasection.c:zend_print_variable
Unexecuted instantiation: random.c:zend_print_variable
Unexecuted instantiation: randomizer.c:zend_print_variable
Unexecuted instantiation: zend_utils.c:zend_print_variable
Unexecuted instantiation: php_reflection.c:zend_print_variable
Unexecuted instantiation: php_spl.c:zend_print_variable
Unexecuted instantiation: spl_array.c:zend_print_variable
Unexecuted instantiation: spl_directory.c:zend_print_variable
Unexecuted instantiation: spl_dllist.c:zend_print_variable
Unexecuted instantiation: spl_exceptions.c:zend_print_variable
Unexecuted instantiation: spl_fixedarray.c:zend_print_variable
Unexecuted instantiation: spl_functions.c:zend_print_variable
Unexecuted instantiation: spl_heap.c:zend_print_variable
Unexecuted instantiation: spl_iterators.c:zend_print_variable
Unexecuted instantiation: spl_observer.c:zend_print_variable
Unexecuted instantiation: array.c:zend_print_variable
Unexecuted instantiation: assert.c:zend_print_variable
Unexecuted instantiation: base64.c:zend_print_variable
Unexecuted instantiation: basic_functions.c:zend_print_variable
Unexecuted instantiation: browscap.c:zend_print_variable
Unexecuted instantiation: crc32_x86.c:zend_print_variable
Unexecuted instantiation: crc32.c:zend_print_variable
Unexecuted instantiation: credits.c:zend_print_variable
Unexecuted instantiation: crypt.c:zend_print_variable
Unexecuted instantiation: css.c:zend_print_variable
Unexecuted instantiation: datetime.c:zend_print_variable
Unexecuted instantiation: dir.c:zend_print_variable
Unexecuted instantiation: dl.c:zend_print_variable
Unexecuted instantiation: dns.c:zend_print_variable
Unexecuted instantiation: exec.c:zend_print_variable
Unexecuted instantiation: file.c:zend_print_variable
Unexecuted instantiation: filestat.c:zend_print_variable
Unexecuted instantiation: filters.c:zend_print_variable
Unexecuted instantiation: flock_compat.c:zend_print_variable
Unexecuted instantiation: formatted_print.c:zend_print_variable
Unexecuted instantiation: fsock.c:zend_print_variable
Unexecuted instantiation: ftok.c:zend_print_variable
Unexecuted instantiation: ftp_fopen_wrapper.c:zend_print_variable
Unexecuted instantiation: head.c:zend_print_variable
Unexecuted instantiation: hrtime.c:zend_print_variable
Unexecuted instantiation: html.c:zend_print_variable
Unexecuted instantiation: http_fopen_wrapper.c:zend_print_variable
Unexecuted instantiation: http.c:zend_print_variable
Unexecuted instantiation: image.c:zend_print_variable
Unexecuted instantiation: incomplete_class.c:zend_print_variable
Unexecuted instantiation: info.c:zend_print_variable
Unexecuted instantiation: iptc.c:zend_print_variable
Unexecuted instantiation: levenshtein.c:zend_print_variable
Unexecuted instantiation: link.c:zend_print_variable
Unexecuted instantiation: mail.c:zend_print_variable
Unexecuted instantiation: math.c:zend_print_variable
Unexecuted instantiation: md5.c:zend_print_variable
Unexecuted instantiation: metaphone.c:zend_print_variable
Unexecuted instantiation: microtime.c:zend_print_variable
Unexecuted instantiation: net.c:zend_print_variable
Unexecuted instantiation: pack.c:zend_print_variable
Unexecuted instantiation: pageinfo.c:zend_print_variable
Unexecuted instantiation: password.c:zend_print_variable
Unexecuted instantiation: php_fopen_wrapper.c:zend_print_variable
Unexecuted instantiation: proc_open.c:zend_print_variable
Unexecuted instantiation: quot_print.c:zend_print_variable
Unexecuted instantiation: scanf.c:zend_print_variable
Unexecuted instantiation: sha1.c:zend_print_variable
Unexecuted instantiation: soundex.c:zend_print_variable
Unexecuted instantiation: streamsfuncs.c:zend_print_variable
Unexecuted instantiation: string.c:zend_print_variable
Unexecuted instantiation: strnatcmp.c:zend_print_variable
Unexecuted instantiation: syslog.c:zend_print_variable
Unexecuted instantiation: type.c:zend_print_variable
Unexecuted instantiation: uniqid.c:zend_print_variable
Unexecuted instantiation: url_scanner_ex.c:zend_print_variable
Unexecuted instantiation: url.c:zend_print_variable
Unexecuted instantiation: user_filters.c:zend_print_variable
Unexecuted instantiation: uuencode.c:zend_print_variable
Unexecuted instantiation: var_unserializer.c:zend_print_variable
Unexecuted instantiation: var.c:zend_print_variable
Unexecuted instantiation: versioning.c:zend_print_variable
Unexecuted instantiation: crypt_sha256.c:zend_print_variable
Unexecuted instantiation: crypt_sha512.c:zend_print_variable
Unexecuted instantiation: php_crypt_r.c:zend_print_variable
Unexecuted instantiation: php_uri.c:zend_print_variable
Unexecuted instantiation: php_uri_common.c:zend_print_variable
Unexecuted instantiation: uri_parser_rfc3986.c:zend_print_variable
Unexecuted instantiation: uri_parser_whatwg.c:zend_print_variable
Unexecuted instantiation: uri_parser_php_parse_url.c:zend_print_variable
Unexecuted instantiation: explicit_bzero.c:zend_print_variable
Unexecuted instantiation: fopen_wrappers.c:zend_print_variable
Unexecuted instantiation: getopt.c:zend_print_variable
Unexecuted instantiation: main.c:zend_print_variable
Unexecuted instantiation: network.c:zend_print_variable
Unexecuted instantiation: output.c:zend_print_variable
Unexecuted instantiation: php_content_types.c:zend_print_variable
Unexecuted instantiation: php_ini_builder.c:zend_print_variable
Unexecuted instantiation: php_ini.c:zend_print_variable
Unexecuted instantiation: php_glob.c:zend_print_variable
Unexecuted instantiation: php_odbc_utils.c:zend_print_variable
Unexecuted instantiation: php_open_temporary_file.c:zend_print_variable
Unexecuted instantiation: php_scandir.c:zend_print_variable
Unexecuted instantiation: php_syslog.c:zend_print_variable
Unexecuted instantiation: php_ticks.c:zend_print_variable
Unexecuted instantiation: php_variables.c:zend_print_variable
Unexecuted instantiation: reentrancy.c:zend_print_variable
Unexecuted instantiation: rfc1867.c:zend_print_variable
Unexecuted instantiation: safe_bcmp.c:zend_print_variable
Unexecuted instantiation: SAPI.c:zend_print_variable
Unexecuted instantiation: snprintf.c:zend_print_variable
Unexecuted instantiation: spprintf.c:zend_print_variable
Unexecuted instantiation: strlcat.c:zend_print_variable
Unexecuted instantiation: strlcpy.c:zend_print_variable
Unexecuted instantiation: cast.c:zend_print_variable
Unexecuted instantiation: filter.c:zend_print_variable
Unexecuted instantiation: glob_wrapper.c:zend_print_variable
Unexecuted instantiation: memory.c:zend_print_variable
Unexecuted instantiation: mmap.c:zend_print_variable
Unexecuted instantiation: plain_wrapper.c:zend_print_variable
Unexecuted instantiation: stream_errors.c:zend_print_variable
Unexecuted instantiation: streams.c:zend_print_variable
Unexecuted instantiation: transports.c:zend_print_variable
Unexecuted instantiation: userspace.c:zend_print_variable
Unexecuted instantiation: xp_socket.c:zend_print_variable
Unexecuted instantiation: block_pass.c:zend_print_variable
Unexecuted instantiation: compact_literals.c:zend_print_variable
Unexecuted instantiation: compact_vars.c:zend_print_variable
Unexecuted instantiation: dce.c:zend_print_variable
Unexecuted instantiation: dfa_pass.c:zend_print_variable
Unexecuted instantiation: escape_analysis.c:zend_print_variable
Unexecuted instantiation: nop_removal.c:zend_print_variable
Unexecuted instantiation: optimize_func_calls.c:zend_print_variable
Unexecuted instantiation: optimize_temp_vars_5.c:zend_print_variable
Unexecuted instantiation: pass1.c:zend_print_variable
Unexecuted instantiation: pass3.c:zend_print_variable
Unexecuted instantiation: sccp.c:zend_print_variable
Unexecuted instantiation: scdf.c:zend_print_variable
Unexecuted instantiation: zend_call_graph.c:zend_print_variable
Unexecuted instantiation: zend_cfg.c:zend_print_variable
Unexecuted instantiation: zend_dfg.c:zend_print_variable
Unexecuted instantiation: zend_dump.c:zend_print_variable
Unexecuted instantiation: zend_func_info.c:zend_print_variable
Unexecuted instantiation: zend_inference.c:zend_print_variable
Unexecuted instantiation: zend_optimizer.c:zend_print_variable
Unexecuted instantiation: zend_ssa.c:zend_print_variable
Unexecuted instantiation: zend_alloc.c:zend_print_variable
Unexecuted instantiation: zend_API.c:zend_print_variable
Unexecuted instantiation: zend_ast.c:zend_print_variable
Unexecuted instantiation: zend_attributes.c:zend_print_variable
Unexecuted instantiation: zend_autoload.c:zend_print_variable
Unexecuted instantiation: zend_builtin_functions.c:zend_print_variable
Unexecuted instantiation: zend_call_stack.c:zend_print_variable
Unexecuted instantiation: zend_closures.c:zend_print_variable
Unexecuted instantiation: zend_compile.c:zend_print_variable
Unexecuted instantiation: zend_constants.c:zend_print_variable
Unexecuted instantiation: zend_cpuinfo.c:zend_print_variable
Unexecuted instantiation: zend_default_classes.c:zend_print_variable
Unexecuted instantiation: zend_dtrace.c:zend_print_variable
Unexecuted instantiation: zend_enum.c:zend_print_variable
Unexecuted instantiation: zend_exceptions.c:zend_print_variable
Unexecuted instantiation: zend_execute_API.c:zend_print_variable
Unexecuted instantiation: zend_execute.c:zend_print_variable
Unexecuted instantiation: zend_extensions.c:zend_print_variable
Unexecuted instantiation: zend_fibers.c:zend_print_variable
Unexecuted instantiation: zend_float.c:zend_print_variable
Unexecuted instantiation: zend_gc.c:zend_print_variable
Unexecuted instantiation: zend_gdb.c:zend_print_variable
Unexecuted instantiation: zend_generators.c:zend_print_variable
Unexecuted instantiation: zend_hash.c:zend_print_variable
Unexecuted instantiation: zend_highlight.c:zend_print_variable
Unexecuted instantiation: zend_hrtime.c:zend_print_variable
Unexecuted instantiation: zend_inheritance.c:zend_print_variable
Unexecuted instantiation: zend_ini_parser.c:zend_print_variable
Unexecuted instantiation: zend_ini_scanner.c:zend_print_variable
Unexecuted instantiation: zend_ini.c:zend_print_variable
Unexecuted instantiation: zend_interfaces.c:zend_print_variable
Unexecuted instantiation: zend_iterators.c:zend_print_variable
Unexecuted instantiation: zend_language_parser.c:zend_print_variable
Unexecuted instantiation: zend_language_scanner.c:zend_print_variable
Unexecuted instantiation: zend_lazy_objects.c:zend_print_variable
Unexecuted instantiation: zend_list.c:zend_print_variable
Unexecuted instantiation: zend_llist.c:zend_print_variable
Unexecuted instantiation: zend_multibyte.c:zend_print_variable
Unexecuted instantiation: zend_object_handlers.c:zend_print_variable
Unexecuted instantiation: zend_objects_API.c:zend_print_variable
Unexecuted instantiation: zend_objects.c:zend_print_variable
Unexecuted instantiation: zend_observer.c:zend_print_variable
Unexecuted instantiation: zend_opcode.c:zend_print_variable
Unexecuted instantiation: zend_operators.c:zend_print_variable
Unexecuted instantiation: zend_property_hooks.c:zend_print_variable
Unexecuted instantiation: zend_ptr_stack.c:zend_print_variable
Unexecuted instantiation: zend_signal.c:zend_print_variable
Unexecuted instantiation: zend_smart_str.c:zend_print_variable
Unexecuted instantiation: zend_sort.c:zend_print_variable
Unexecuted instantiation: zend_stack.c:zend_print_variable
Unexecuted instantiation: zend_stream.c:zend_print_variable
Unexecuted instantiation: zend_string.c:zend_print_variable
Unexecuted instantiation: zend_strtod.c:zend_print_variable
Unexecuted instantiation: zend_system_id.c:zend_print_variable
Unexecuted instantiation: zend_variables.c:zend_print_variable
Unexecuted instantiation: zend_virtual_cwd.c:zend_print_variable
Unexecuted instantiation: zend_vm_opcodes.c:zend_print_variable
Unexecuted instantiation: zend_weakrefs.c:zend_print_variable
Unexecuted instantiation: zend.c:zend_print_variable
Unexecuted instantiation: internal_functions_cli.c:zend_print_variable
Unexecuted instantiation: fuzzer-json.c:zend_print_variable
Unexecuted instantiation: fuzzer-sapi.c:zend_print_variable
325
326
ZEND_API ZEND_COLD void zend_output_debug_string(bool trigger_break, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3);
327
328
ZEND_API void zend_activate(void);
329
ZEND_API void zend_deactivate(void);
330
ZEND_API void zend_call_destructors(void);
331
ZEND_API void zend_activate_modules(void);
332
ZEND_API void zend_deactivate_modules(void);
333
ZEND_API void zend_post_deactivate_modules(void);
334
335
ZEND_API void free_estring(char **str_p);
336
337
END_EXTERN_C()
338
339
/* output support */
340
0
#define ZEND_WRITE(str, str_len)    zend_write((str), (str_len))
341
#define ZEND_WRITE_EX(str, str_len)   write_func((str), (str_len))
342
0
#define ZEND_PUTS(str)          zend_write((str), strlen((str)))
343
#define ZEND_PUTS_EX(str)       write_func((str), strlen((str)))
344
0
#define ZEND_PUTC(c)          zend_write(&(c), 1)
345
346
BEGIN_EXTERN_C()
347
extern ZEND_API size_t (*zend_printf)(const char *format, ...) ZEND_ATTRIBUTE_PTR_FORMAT(printf, 1, 2);
348
extern ZEND_API zend_write_func_t zend_write;
349
extern ZEND_API FILE *(*zend_fopen)(zend_string *filename, zend_string **opened_path);
350
extern ZEND_API void (*zend_ticks_function)(int ticks);
351
352
/* Called by the VM in certain places like at the loop header, user function
353
 * entry, and after internal function calls, if EG(vm_interrupt) has been set.
354
 *
355
 * If this is used to switch the EG(current_execute_data), such as implementing
356
 * a coroutine scheduler, then it needs to check the top frame to see if it's
357
 * an internal function. If an internal function is on top, then the frame
358
 * shouldn't be switched away.
359
 *
360
 * Prior to PHP 8.0, this check was not necessary. In PHP 8.0,
361
 * zend_call_function started calling zend_interrupt_function, and in 8.4 the
362
 * DO_*CALL* opcodes started calling the zend_interrupt_function while the
363
 * internal frame is still on top.
364
 */
365
extern ZEND_API void (*zend_interrupt_function)(zend_execute_data *execute_data);
366
367
extern ZEND_API void (*zend_error_cb)(int type, zend_string *error_filename, const uint32_t error_lineno, zend_string *message);
368
extern ZEND_API void (*zend_on_timeout)(int seconds);
369
extern ZEND_API zend_result (*zend_stream_open_function)(zend_file_handle *handle);
370
extern void (*zend_printf_to_smart_string)(smart_string *buf, const char *format, va_list ap);
371
extern void (*zend_printf_to_smart_str)(smart_str *buf, const char *format, va_list ap);
372
extern ZEND_API char *(*zend_getenv)(const char *name, size_t name_len);
373
extern ZEND_API zend_string *(*zend_resolve_path)(zend_string *filename);
374
/* Generate 'size' random bytes into 'bytes' with the OS CSPRNG. */
375
extern ZEND_ATTRIBUTE_NONNULL ZEND_API zend_result (*zend_random_bytes)(
376
    void *bytes, size_t size, char *errstr, size_t errstr_size);
377
/* Generate 'size' random bytes into 'bytes' with a general purpose PRNG (not
378
 * crypto safe). 'state' must be zeroed before the first call and can be reused.
379
 */
380
extern ZEND_ATTRIBUTE_NONNULL ZEND_API void (*zend_random_bytes_insecure)(
381
    zend_random_bytes_insecure_state *state, void *bytes, size_t size);
382
383
/* These two callbacks are especially for opcache */
384
extern ZEND_API zend_result (*zend_post_startup_cb)(void);
385
extern ZEND_API void (*zend_post_shutdown_cb)(void);
386
387
extern ZEND_API void (*zend_accel_schedule_restart_hook)(int reason);
388
389
ZEND_API ZEND_COLD void zend_error(int type, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3);
390
ZEND_API ZEND_COLD ZEND_NORETURN void zend_error_noreturn(int type, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3);
391
ZEND_API ZEND_COLD ZEND_NORETURN void zend_error_noreturn_unchecked(int type, const char *format, ...);
392
/* For custom format specifiers like H */
393
ZEND_API ZEND_COLD void zend_error_unchecked(int type, const char *format, ...);
394
/* If filename is NULL the default filename is used. */
395
ZEND_API ZEND_COLD void zend_error_at(int type, zend_string *filename, uint32_t lineno, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 4, 5);
396
ZEND_API ZEND_COLD ZEND_NORETURN void zend_error_at_noreturn(int type, zend_string *filename, uint32_t lineno, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 4, 5);
397
ZEND_API ZEND_COLD void zend_error_zstr(int type, zend_string *message);
398
ZEND_API ZEND_COLD void zend_error_zstr_at(int type, zend_string *filename, uint32_t lineno, zend_string *message);
399
400
ZEND_API ZEND_COLD void zend_throw_error(zend_class_entry *exception_ce, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3);
401
ZEND_API ZEND_COLD void zend_type_error(const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 1, 2);
402
ZEND_API ZEND_COLD void zend_argument_count_error(const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 1, 2);
403
ZEND_API ZEND_COLD void zend_value_error(const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 1, 2);
404
/* type should be one of the BP_VAR_* constants, only special messages happen for isset/empty and unset */
405
ZEND_API ZEND_COLD void zend_illegal_container_offset(const zend_string *container, const zval *offset, int type);
406
407
ZEND_COLD void zenderror(const char *error);
408
409
/* For internal C errors */
410
ZEND_API ZEND_COLD ZEND_NORETURN void zend_strerror_noreturn(int type, int errn, const char *message);
411
412
/* The following #define is used for code duality in PHP for Engine 1 & 2 */
413
#define ZEND_STANDARD_CLASS_DEF_PTR zend_standard_class_def
414
extern ZEND_API zend_class_entry *zend_standard_class_def;
415
extern ZEND_API zend_utility_values zend_uv;
416
417
/* If DTrace is available and enabled */
418
extern ZEND_API bool zend_dtrace_enabled;
419
END_EXTERN_C()
420
421
#define ZEND_UV(name) (zend_uv.name)
422
423
BEGIN_EXTERN_C()
424
ZEND_API void zend_message_dispatcher(zend_long message, const void *data);
425
426
ZEND_API zval *zend_get_configuration_directive(zend_string *name);
427
END_EXTERN_C()
428
429
/* Messages for applications of Zend */
430
0
#define ZMSG_FAILED_INCLUDE_FOPEN   1L
431
0
#define ZMSG_FAILED_REQUIRE_FOPEN   2L
432
0
#define ZMSG_FAILED_HIGHLIGHT_FOPEN   3L
433
0
#define ZMSG_MEMORY_LEAK_DETECTED   4L
434
0
#define ZMSG_MEMORY_LEAK_REPEATED   5L
435
0
#define ZMSG_LOG_SCRIPT_NAME      6L
436
0
#define ZMSG_MEMORY_LEAKS_GRAND_TOTAL 7L
437
438
typedef enum {
439
  EH_NORMAL = 0,
440
  EH_THROW
441
} zend_error_handling_t;
442
443
typedef struct {
444
  zend_error_handling_t  handling;
445
  zend_class_entry       *exception;
446
} zend_error_handling;
447
448
BEGIN_EXTERN_C()
449
ZEND_API void zend_save_error_handling(zend_error_handling *current);
450
ZEND_API void zend_replace_error_handling(zend_error_handling_t error_handling, zend_class_entry *exception_class, zend_error_handling *current);
451
ZEND_API void zend_restore_error_handling(const zend_error_handling *saved);
452
ZEND_API void zend_begin_record_errors(void);
453
ZEND_API void zend_emit_recorded_errors(void);
454
ZEND_API void zend_emit_recorded_errors_ex(uint32_t num_errors, zend_error_info **errors);
455
ZEND_API void zend_free_recorded_errors(void);
456
END_EXTERN_C()
457
458
0
#define DEBUG_BACKTRACE_PROVIDE_OBJECT (1<<0)
459
0
#define DEBUG_BACKTRACE_IGNORE_ARGS    (1<<1)
460
461
#include "zend_object_handlers.h"
462
#include "zend_operators.h"
463
464
#endif /* ZEND_H */