Coverage Report

Created: 2025-11-16 06:23

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 (c) Zend Technologies Ltd. (http://www.zend.com)           |
6
   +----------------------------------------------------------------------+
7
   | This source file is subject to version 2.00 of the Zend license,     |
8
   | that is bundled with this package in the file LICENSE, and is        |
9
   | available through the world-wide-web at the following url:           |
10
   | http://www.zend.com/license/2_00.txt.                                |
11
   | If you did not receive a copy of the Zend license and are unable to  |
12
   | obtain it through the world-wide-web, please send a note to          |
13
   | license@zend.com so we can mail you a copy immediately.              |
14
   +----------------------------------------------------------------------+
15
   | Authors: Andi Gutmans <andi@php.net>                                 |
16
   |          Zeev Suraski <zeev@php.net>                                 |
17
   +----------------------------------------------------------------------+
18
*/
19
20
#ifndef ZEND_H
21
#define ZEND_H
22
23
#define ZEND_VERSION "4.6.0-dev"
24
25
#define ZEND_ENGINE_3
26
27
#include "zend_types.h"
28
#include "zend_map_ptr.h"
29
#include "zend_errors.h"
30
#include "zend_alloc.h"
31
#include "zend_llist.h"
32
#include "zend_string.h"
33
#include "zend_hash.h"
34
#include "zend_ast.h"
35
#include "zend_gc.h"
36
#include "zend_variables.h"
37
#include "zend_iterators.h"
38
#include "zend_stream.h"
39
#include "zend_smart_str_public.h"
40
#include "zend_smart_string_public.h"
41
#include "zend_signal.h"
42
#include "zend_max_execution_timer.h"
43
44
#define zend_sprintf sprintf
45
46
678k
#define HANDLE_BLOCK_INTERRUPTIONS()    ZEND_SIGNAL_BLOCK_INTERRUPTIONS()
47
678k
#define HANDLE_UNBLOCK_INTERRUPTIONS()    ZEND_SIGNAL_UNBLOCK_INTERRUPTIONS()
48
49
#define INTERNAL_FUNCTION_PARAMETERS zend_execute_data *execute_data, zval *return_value
50
6.93k
#define INTERNAL_FUNCTION_PARAM_PASSTHRU execute_data, return_value
51
52
#define USED_RET() \
53
1.83k
  (!EX(prev_execute_data) || \
54
1.83k
   !ZEND_USER_CODE(EX(prev_execute_data)->func->common.type) || \
55
1.83k
   (EX(prev_execute_data)->opline->result_type != IS_UNUSED))
56
57
#ifdef ZEND_ENABLE_STATIC_TSRMLS_CACHE
58
#define ZEND_TSRMG TSRMG_STATIC
59
#define ZEND_TSRMG_FAST TSRMG_FAST_STATIC
60
#define ZEND_TSRMLS_CACHE_EXTERN() TSRMLS_CACHE_EXTERN()
61
#define ZEND_TSRMLS_CACHE_DEFINE() TSRMLS_CACHE_DEFINE()
62
#define ZEND_TSRMLS_CACHE_UPDATE() TSRMLS_CACHE_UPDATE()
63
#define ZEND_TSRMLS_CACHE TSRMLS_CACHE
64
#else
65
#define ZEND_TSRMG TSRMG
66
#define ZEND_TSRMG_FAST TSRMG_FAST
67
#define ZEND_TSRMLS_CACHE_EXTERN()
68
#define ZEND_TSRMLS_CACHE_DEFINE()
69
#define ZEND_TSRMLS_CACHE_UPDATE()
70
#define ZEND_TSRMLS_CACHE
71
#endif
72
73
#ifndef ZEND_COMPILE_DL_EXT
74
TSRMLS_MAIN_CACHE_EXTERN()
75
#else
76
ZEND_TSRMLS_CACHE_EXTERN()
77
#endif
78
79
struct _zend_serialize_data;
80
struct _zend_unserialize_data;
81
82
typedef struct _zend_serialize_data zend_serialize_data;
83
typedef struct _zend_unserialize_data zend_unserialize_data;
84
85
typedef struct _zend_class_name {
86
  zend_string *name;
87
  zend_string *lc_name;
88
} zend_class_name;
89
90
typedef struct _zend_trait_method_reference {
91
  zend_string *method_name;
92
  zend_string *class_name;
93
} zend_trait_method_reference;
94
95
typedef struct _zend_trait_precedence {
96
  zend_trait_method_reference trait_method;
97
  uint32_t num_excludes;
98
  zend_string *exclude_class_names[1];
99
} zend_trait_precedence;
100
101
typedef struct _zend_trait_alias {
102
  zend_trait_method_reference trait_method;
103
104
  /**
105
  * name for method to be added
106
  */
107
  zend_string *alias;
108
109
  /**
110
  * modifiers to be set on trait method
111
  */
112
  uint32_t modifiers;
113
} zend_trait_alias;
114
115
typedef struct _zend_class_mutable_data {
116
  zval      *default_properties_table;
117
  HashTable *constants_table;
118
  uint32_t   ce_flags;
119
  HashTable *backed_enum_table;
120
} zend_class_mutable_data;
121
122
typedef struct _zend_class_dependency {
123
  zend_string      *name;
124
  zend_class_entry *ce;
125
} zend_class_dependency;
126
127
typedef struct _zend_inheritance_cache_entry zend_inheritance_cache_entry;
128
129
typedef struct _zend_error_info {
130
  int type;
131
  uint32_t lineno;
132
  zend_string *filename;
133
  zend_string *message;
134
} zend_error_info;
135
136
struct _zend_inheritance_cache_entry {
137
  zend_inheritance_cache_entry *next;
138
  zend_class_entry             *ce;
139
  zend_class_entry             *parent;
140
  zend_class_dependency        *dependencies;
141
  uint32_t                      dependencies_count;
142
  uint32_t                      num_warnings;
143
  zend_error_info             **warnings;
144
  zend_class_entry             *traits_and_interfaces[1];
145
};
146
147
struct _zend_class_entry {
148
  char type;
149
  zend_string *name;
150
  /* class_entry or string depending on ZEND_ACC_LINKED */
151
  union {
152
    zend_class_entry *parent;
153
    zend_string *parent_name;
154
  };
155
  uint32_t refcount;
156
  uint32_t ce_flags;
157
  uint32_t ce_flags2;
158
159
  int default_properties_count;
160
  uint32_t default_static_members_count;
161
  zval *default_properties_table;
162
  zval *default_static_members_table;
163
  ZEND_MAP_PTR_DEF(zval *, static_members_table);
164
  HashTable function_table;
165
  HashTable properties_info;
166
  HashTable constants_table;
167
168
  ZEND_MAP_PTR_DEF(zend_class_mutable_data*, mutable_data);
169
  zend_inheritance_cache_entry *inheritance_cache;
170
171
  struct _zend_property_info **properties_info_table;
172
173
  zend_function *constructor;
174
  zend_function *destructor;
175
  zend_function *clone;
176
  zend_function *__get;
177
  zend_function *__set;
178
  zend_function *__unset;
179
  zend_function *__isset;
180
  zend_function *__call;
181
  zend_function *__callstatic;
182
  zend_function *__tostring;
183
  zend_function *__debugInfo;
184
  zend_function *__serialize;
185
  zend_function *__unserialize;
186
187
  const zend_object_handlers *default_object_handlers;
188
189
  /* allocated only if class implements Iterator or IteratorAggregate interface */
190
  zend_class_iterator_funcs *iterator_funcs_ptr;
191
  /* allocated only if class implements ArrayAccess interface */
192
  zend_class_arrayaccess_funcs *arrayaccess_funcs_ptr;
193
194
  /* handlers */
195
  union {
196
    zend_object* (*create_object)(zend_class_entry *class_type);
197
    int (*interface_gets_implemented)(zend_class_entry *iface, zend_class_entry *class_type); /* a class implements this interface */
198
  };
199
  zend_object_iterator *(*get_iterator)(zend_class_entry *ce, zval *object, int by_ref);
200
  zend_function *(*get_static_method)(zend_class_entry *ce, zend_string* method);
201
202
  /* serializer callbacks */
203
  int (*serialize)(zval *object, unsigned char **buffer, size_t *buf_len, zend_serialize_data *data);
204
  int (*unserialize)(zval *object, zend_class_entry *ce, const unsigned char *buf, size_t buf_len, zend_unserialize_data *data);
205
206
  uint32_t num_interfaces;
207
  uint32_t num_traits;
208
  uint32_t num_hooked_props;
209
  uint32_t num_hooked_prop_variance_checks;
210
211
  /* class_entry or string(s) depending on ZEND_ACC_LINKED */
212
  union {
213
    zend_class_entry **interfaces;
214
    zend_class_name *interface_names;
215
  };
216
217
  zend_class_name *trait_names;
218
  zend_trait_alias **trait_aliases;
219
  zend_trait_precedence **trait_precedences;
220
  HashTable *attributes;
221
222
  uint32_t enum_backing_type;
223
  HashTable *backed_enum_table;
224
225
  zend_string *doc_comment;
226
227
  union {
228
    struct {
229
      zend_string *filename;
230
      uint32_t line_start;
231
      uint32_t line_end;
232
    } user;
233
    struct {
234
      const struct _zend_function_entry *builtin_functions;
235
      struct _zend_module_entry *module;
236
    } internal;
237
  } info;
238
};
239
240
typedef union {
241
  zend_max_align_t align;
242
  uint64_t opaque[5];
243
} zend_random_bytes_insecure_state;
244
245
typedef struct _zend_utility_functions {
246
  void (*error_function)(int type, zend_string *error_filename, const uint32_t error_lineno, zend_string *message);
247
  size_t (*printf_function)(const char *format, ...) ZEND_ATTRIBUTE_PTR_FORMAT(printf, 1, 2);
248
  size_t (*write_function)(const char *str, size_t str_length);
249
  FILE *(*fopen_function)(zend_string *filename, zend_string **opened_path);
250
  void (*message_handler)(zend_long message, const void *data);
251
  zval *(*get_configuration_directive)(zend_string *name);
252
  void (*ticks_function)(int ticks);
253
  void (*on_timeout)(int seconds);
254
  zend_result (*stream_open_function)(zend_file_handle *handle);
255
  void (*printf_to_smart_string_function)(smart_string *buf, const char *format, va_list ap);
256
  void (*printf_to_smart_str_function)(smart_str *buf, const char *format, va_list ap);
257
  char *(*getenv_function)(const char *name, size_t name_len);
258
  zend_string *(*resolve_path_function)(zend_string *filename);
259
  zend_result (*random_bytes_function)(void *bytes, size_t size, char *errstr, size_t errstr_size);
260
  void (*random_bytes_insecure_function)(zend_random_bytes_insecure_state *state, void *bytes, size_t size);
261
} zend_utility_functions;
262
263
typedef struct _zend_utility_values {
264
  bool html_errors;
265
} zend_utility_values;
266
267
typedef size_t (*zend_write_func_t)(const char *str, size_t str_length);
268
269
22.9k
#define zend_bailout()    _zend_bailout(__FILE__, __LINE__)
270
271
#define zend_try                        \
272
6.31M
  {                             \
273
6.31M
    JMP_BUF *__orig_bailout = EG(bailout);          \
274
6.31M
    JMP_BUF __bailout;                   \
275
6.31M
                                \
276
6.31M
    EG(bailout) = &__bailout;               \
277
6.31M
    if (SETJMP(__bailout)==0) {
278
#define zend_catch                        \
279
830k
    } else {                       \
280
18
      EG(bailout) = __orig_bailout;
281
#define zend_end_try()                      \
282
5.48M
    }                            \
283
6.31M
    EG(bailout) = __orig_bailout;             \
284
258k
  }
285
161k
#define zend_first_try    EG(bailout)=NULL; zend_try
286
287
BEGIN_EXTERN_C()
288
void zend_startup(zend_utility_functions *utility_functions);
289
void zend_shutdown(void);
290
void zend_register_standard_ini_entries(void);
291
zend_result zend_post_startup(void);
292
void zend_set_utility_values(zend_utility_values *utility_values);
293
void zend_unload_modules(void);
294
295
ZEND_API ZEND_COLD ZEND_NORETURN void _zend_bailout(const char *filename, uint32_t lineno);
296
ZEND_API size_t zend_get_page_size(void);
297
298
ZEND_API size_t zend_vspprintf(char **pbuf, size_t max_len, const char *format, va_list ap);
299
ZEND_API size_t zend_spprintf(char **message, size_t max_len, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 3, 4);
300
ZEND_API zend_string *zend_vstrpprintf(size_t max_len, const char *format, va_list ap);
301
ZEND_API zend_string *zend_strpprintf(size_t max_len, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3);
302
303
/* Same as zend_spprintf and zend_strpprintf, without checking of format validity.
304
 * For use with custom printf specifiers such as %H. */
305
ZEND_API size_t zend_spprintf_unchecked(char **message, size_t max_len, const char *format, ...);
306
ZEND_API zend_string *zend_strpprintf_unchecked(size_t max_len, const char *format, ...);
307
308
ZEND_API const char *get_zend_version(void);
309
ZEND_API bool zend_make_printable_zval(zval *expr, zval *expr_copy);
310
ZEND_API size_t zend_print_zval(zval *expr, int indent);
311
ZEND_API void zend_print_zval_r(zval *expr, int indent);
312
ZEND_API zend_string *zend_print_zval_r_to_str(zval *expr, int indent);
313
ZEND_API void zend_print_flat_zval_r(zval *expr);
314
void zend_print_flat_zval_r_to_buf(smart_str *str, zval *expr);
315
316
0
static zend_always_inline size_t zend_print_variable(zval *var) {
317
0
  return zend_print_zval(var, 0);
318
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: 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_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-parser.c:zend_print_variable
Unexecuted instantiation: fuzzer-sapi.c:zend_print_variable
Unexecuted instantiation: fuzzer-tracing-jit.c:zend_print_variable
Unexecuted instantiation: fuzzer-exif.c:zend_print_variable
Unexecuted instantiation: fuzzer-unserialize.c:zend_print_variable
Unexecuted instantiation: fuzzer-function-jit.c:zend_print_variable
Unexecuted instantiation: fuzzer-json.c:zend_print_variable
Unexecuted instantiation: fuzzer-unserializehash.c:zend_print_variable
Unexecuted instantiation: fuzzer-execute.c:zend_print_variable
319
320
ZEND_API ZEND_COLD void zend_output_debug_string(bool trigger_break, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3);
321
322
ZEND_API void zend_activate(void);
323
ZEND_API void zend_deactivate(void);
324
ZEND_API void zend_call_destructors(void);
325
ZEND_API void zend_activate_modules(void);
326
ZEND_API void zend_deactivate_modules(void);
327
ZEND_API void zend_post_deactivate_modules(void);
328
329
ZEND_API void free_estring(char **str_p);
330
331
END_EXTERN_C()
332
333
/* output support */
334
304
#define ZEND_WRITE(str, str_len)    zend_write((str), (str_len))
335
#define ZEND_WRITE_EX(str, str_len)   write_func((str), (str_len))
336
1.03M
#define ZEND_PUTS(str)          zend_write((str), strlen((str)))
337
#define ZEND_PUTS_EX(str)       write_func((str), strlen((str)))
338
29.6M
#define ZEND_PUTC(c)          zend_write(&(c), 1)
339
340
BEGIN_EXTERN_C()
341
extern ZEND_API size_t (*zend_printf)(const char *format, ...) ZEND_ATTRIBUTE_PTR_FORMAT(printf, 1, 2);
342
extern ZEND_API zend_write_func_t zend_write;
343
extern ZEND_API FILE *(*zend_fopen)(zend_string *filename, zend_string **opened_path);
344
extern ZEND_API void (*zend_ticks_function)(int ticks);
345
346
/* Called by the VM in certain places like at the loop header, user function
347
 * entry, and after internal function calls, if EG(vm_interrupt) has been set.
348
 *
349
 * If this is used to switch the EG(current_execute_data), such as implementing
350
 * a coroutine scheduler, then it needs to check the top frame to see if it's
351
 * an internal function. If an internal function is on top, then the frame
352
 * shouldn't be switched away.
353
 *
354
 * Prior to PHP 8.0, this check was not necessary. In PHP 8.0,
355
 * zend_call_function started calling zend_interrupt_function, and in 8.4 the
356
 * DO_*CALL* opcodes started calling the zend_interrupt_function while the
357
 * internal frame is still on top.
358
 */
359
extern ZEND_API void (*zend_interrupt_function)(zend_execute_data *execute_data);
360
361
extern ZEND_API void (*zend_error_cb)(int type, zend_string *error_filename, const uint32_t error_lineno, zend_string *message);
362
extern ZEND_API void (*zend_on_timeout)(int seconds);
363
extern ZEND_API zend_result (*zend_stream_open_function)(zend_file_handle *handle);
364
extern void (*zend_printf_to_smart_string)(smart_string *buf, const char *format, va_list ap);
365
extern void (*zend_printf_to_smart_str)(smart_str *buf, const char *format, va_list ap);
366
extern ZEND_API char *(*zend_getenv)(const char *name, size_t name_len);
367
extern ZEND_API zend_string *(*zend_resolve_path)(zend_string *filename);
368
/* Generate 'size' random bytes into 'bytes' with the OS CSPRNG. */
369
extern ZEND_ATTRIBUTE_NONNULL ZEND_API zend_result (*zend_random_bytes)(
370
    void *bytes, size_t size, char *errstr, size_t errstr_size);
371
/* Generate 'size' random bytes into 'bytes' with a general purpose PRNG (not
372
 * crypto safe). 'state' must be zeroed before the first call and can be reused.
373
 */
374
extern ZEND_ATTRIBUTE_NONNULL ZEND_API void (*zend_random_bytes_insecure)(
375
    zend_random_bytes_insecure_state *state, void *bytes, size_t size);
376
377
/* These two callbacks are especially for opcache */
378
extern ZEND_API zend_result (*zend_post_startup_cb)(void);
379
extern ZEND_API void (*zend_post_shutdown_cb)(void);
380
381
extern ZEND_API void (*zend_accel_schedule_restart_hook)(int reason);
382
383
ZEND_API ZEND_COLD void zend_error(int type, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3);
384
ZEND_API ZEND_COLD ZEND_NORETURN void zend_error_noreturn(int type, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3);
385
ZEND_API ZEND_COLD ZEND_NORETURN void zend_error_noreturn_unchecked(int type, const char *format, ...);
386
/* For custom format specifiers like H */
387
ZEND_API ZEND_COLD void zend_error_unchecked(int type, const char *format, ...);
388
/* If filename is NULL the default filename is used. */
389
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);
390
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);
391
ZEND_API ZEND_COLD void zend_error_zstr(int type, zend_string *message);
392
ZEND_API ZEND_COLD void zend_error_zstr_at(int type, zend_string *filename, uint32_t lineno, zend_string *message);
393
394
ZEND_API ZEND_COLD void zend_throw_error(zend_class_entry *exception_ce, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3);
395
ZEND_API ZEND_COLD void zend_type_error(const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 1, 2);
396
ZEND_API ZEND_COLD void zend_argument_count_error(const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 1, 2);
397
ZEND_API ZEND_COLD void zend_value_error(const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 1, 2);
398
/* type should be one of the BP_VAR_* constants, only special messages happen for isset/empty and unset */
399
ZEND_API ZEND_COLD void zend_illegal_container_offset(const zend_string *container, const zval *offset, int type);
400
401
ZEND_COLD void zenderror(const char *error);
402
403
/* For internal C errors */
404
ZEND_API ZEND_COLD ZEND_NORETURN void zend_strerror_noreturn(int type, int errn, const char *message);
405
406
/* The following #define is used for code duality in PHP for Engine 1 & 2 */
407
#define ZEND_STANDARD_CLASS_DEF_PTR zend_standard_class_def
408
extern ZEND_API zend_class_entry *zend_standard_class_def;
409
extern ZEND_API zend_utility_values zend_uv;
410
411
/* If DTrace is available and enabled */
412
extern ZEND_API bool zend_dtrace_enabled;
413
END_EXTERN_C()
414
415
#define ZEND_UV(name) (zend_uv.name)
416
417
BEGIN_EXTERN_C()
418
ZEND_API void zend_message_dispatcher(zend_long message, const void *data);
419
420
ZEND_API zval *zend_get_configuration_directive(zend_string *name);
421
END_EXTERN_C()
422
423
/* Messages for applications of Zend */
424
2.92k
#define ZMSG_FAILED_INCLUDE_FOPEN   1L
425
2.02k
#define ZMSG_FAILED_REQUIRE_FOPEN   2L
426
0
#define ZMSG_FAILED_HIGHLIGHT_FOPEN   3L
427
0
#define ZMSG_MEMORY_LEAK_DETECTED   4L
428
0
#define ZMSG_MEMORY_LEAK_REPEATED   5L
429
0
#define ZMSG_LOG_SCRIPT_NAME      6L
430
0
#define ZMSG_MEMORY_LEAKS_GRAND_TOTAL 7L
431
432
typedef enum {
433
  EH_NORMAL = 0,
434
  EH_THROW
435
} zend_error_handling_t;
436
437
typedef struct {
438
  zend_error_handling_t  handling;
439
  zend_class_entry       *exception;
440
} zend_error_handling;
441
442
BEGIN_EXTERN_C()
443
ZEND_API void zend_save_error_handling(zend_error_handling *current);
444
ZEND_API void zend_replace_error_handling(zend_error_handling_t error_handling, zend_class_entry *exception_class, zend_error_handling *current);
445
ZEND_API void zend_restore_error_handling(const zend_error_handling *saved);
446
ZEND_API void zend_begin_record_errors(void);
447
ZEND_API void zend_emit_recorded_errors(void);
448
ZEND_API void zend_emit_recorded_errors_ex(uint32_t num_errors, zend_error_info **errors);
449
ZEND_API void zend_free_recorded_errors(void);
450
END_EXTERN_C()
451
452
466k
#define DEBUG_BACKTRACE_PROVIDE_OBJECT (1<<0)
453
599k
#define DEBUG_BACKTRACE_IGNORE_ARGS    (1<<1)
454
455
#include "zend_object_handlers.h"
456
#include "zend_operators.h"
457
458
#endif /* ZEND_H */