php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
zend_globals.h
Go to the documentation of this file.
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_GLOBALS_H
21#define ZEND_GLOBALS_H
22
23
24#include <setjmp.h>
25#include <stdint.h>
26#include <sys/types.h>
27
28#include "zend_globals_macros.h"
29
30#include "zend_atomic.h"
31#include "zend_stack.h"
32#include "zend_ptr_stack.h"
33#include "zend_hash.h"
34#include "zend_llist.h"
35#include "zend_objects.h"
36#include "zend_objects_API.h"
37#include "zend_modules.h"
38#include "zend_float.h"
39#include "zend_multibyte.h"
40#include "zend_multiply.h"
41#include "zend_arena.h"
42#include "zend_call_stack.h"
44#include "zend_strtod.h"
45#include "zend_lazy_objects.h"
46
47/* Define ZTS if you want a thread-safe Zend */
48/*#undef ZTS*/
49
50#ifdef ZTS
51
53ZEND_API extern int compiler_globals_id;
54ZEND_API extern int executor_globals_id;
55ZEND_API extern size_t compiler_globals_offset;
56ZEND_API extern size_t executor_globals_offset;
58
59#endif
60
61#define SYMTABLE_CACHE_SIZE 32
62
63#ifdef ZEND_CHECK_STACK_LIMIT
64# define ZEND_MAX_ALLOWED_STACK_SIZE_UNCHECKED -1
65# define ZEND_MAX_ALLOWED_STACK_SIZE_DETECT 0
66#endif
67
68#include "zend_compile.h"
69
70/* excpt.h on Digital Unix 4.0 defines function_table */
71#undef function_table
72
76typedef struct _zend_fiber zend_fiber;
77
83
86
88
90
92
94
95 HashTable *function_table; /* function symbol table */
96 HashTable *class_table; /* class table */
97
99
100 /* Refer to zend_yytnamerr() in zend_language_parser.y for meaning of values */
101 uint8_t parse_error;
104
106
108
110
112
115
116 bool variable_width_locale; /* UTF-8, Shift-JIS, Big5, ISO 2022, EUC, etc */
117 bool ascii_compatible_locale; /* locale uses ASCII characters as singletons */
118 /* and don't use them as lead/trail units */
119
122
123 uint32_t compiler_options; /* set of ZEND_COMPILE_* constants */
124
127
129
131
137
140
144
149
154
156
159
161#ifdef ZTS
162 uint32_t copied_functions_count;
163#endif
164};
165
166
170
171 /* symbol table cache */
173 /* Pointer to one past the end of the symtable_cache */
175 /* Pointer to first unused symtable_cache slot */
177
178 zend_array symbol_table; /* main symbol table */
179
180 HashTable included_files; /* files already included */
181
183
186
187 HashTable *function_table; /* function symbol table */
188 HashTable *class_table; /* class table */
189 HashTable *zend_constants; /* constants table */
190
195
197 zend_class_entry *fake_scope; /* used to avoid checks accessing properties */
198
199 uint32_t jit_trace_num; /* Used by tracing JIT to reference the currently running trace */
200
202
204
206
210
211 /* for extended information support */
213
215
218
220
224
225#ifdef ZEND_WIN32
226 OSVERSIONINFOEX windows_version_info;
227#endif
228
231
239
242
244
245 /* timeout support */
247
251
257
259
260 bool active;
261 uint8_t flags;
262
264
265 uint32_t ht_iterators_count; /* number of allocated slots */
266 uint32_t ht_iterators_used; /* number of used slots */
269
271#if XPFPA_HAVE_CW
272 XPFPA_CW_DATATYPE saved_fpu_cw;
273#endif
274
277
279
281
283
286
287 /* Active instance of Fiber. */
289
290 /* Default fiber C stack size. */
292
293 /* If record_errors is enabled, all emitted diagnostics will be recorded,
294 * in addition to being processed as usual. */
296 uint32_t num_errors;
298
299 /* Override filename or line number of thrown errors and exceptions */
302
303#ifdef ZEND_CHECK_STACK_LIMIT
304 zend_call_stack call_stack;
305 zend_long max_allowed_stack_size;
306 zend_ulong reserved_stack_size;
307#endif
308
309#ifdef ZEND_MAX_EXECUTION_TIMERS
310 timer_t max_execution_timer_timer;
311 pid_t pid;
312 struct sigaction oldact;
313#endif
314
316
318};
319
320#define EG_FLAGS_INITIAL (0)
321#define EG_FLAGS_IN_SHUTDOWN (1<<0)
322#define EG_FLAGS_OBJECT_STORE_NO_REUSE (1<<1)
323#define EG_FLAGS_IN_RESOURCE_SHUTDOWN (1<<2)
324
328
329 unsigned int yy_leng;
330 const unsigned char *yy_start;
331 const unsigned char *yy_text;
332 const unsigned char *yy_cursor;
333 const unsigned char *yy_marker;
334 const unsigned char *yy_limit;
337
340
341 /* Modes are: ZEND_INI_SCANNER_NORMAL, ZEND_INI_SCANNER_RAW, ZEND_INI_SCANNER_TYPED */
343};
344
350
354
355 unsigned int yy_leng;
356 unsigned char *yy_start;
357 unsigned char *yy_text;
358 unsigned char *yy_cursor;
359 unsigned char *yy_marker;
360 unsigned char *yy_limit;
364 zend_stack nest_location_stack; /* for syntax error reporting */
368
369 /* original (unfiltered) script */
370 unsigned char *script_org;
372
373 /* filtered script */
374 unsigned char *script_filtered;
376
377 /* input/output filters */
381
382 /* initial string length after scanning to first variable */
384
385 /* hooks */
387 zend_php_scanner_event event, int token, int line,
388 const char *text, size_t length, void *context);
390};
391
392#endif /* ZEND_GLOBALS_H */
int line
Definition php_ffi.h:54
unsigned const char * text
Definition php_ffi.h:53
zend_string * doc_comment
struct _zend_ini_parser_param * ini_parser_param
zend_op_array * active_op_array
const zend_encoding ** script_encoding_list
zend_string * compiled_filename
zend_file_context file_context
zend_stack short_circuiting_opnums
zend_memoize_mode memoize_mode
HashTable * function_table
zend_class_entry * active_class_entry
zend_oparray_context context
HashTable * delayed_autoloads
uint32_t internal_run_time_cache_size
HashTable * delayed_variance_obligations
zend_class_entry * current_linking_class
zend_stack delayed_oplines_stack
struct _zend_module_entry * current_module
zend_lazy_objects_store lazy_objects_store
zend_stack user_exception_handlers
zend_error_info ** errors
zend_atomic_bool timed_out
zend_get_gc_buffer get_gc_buffer
zend_fiber_context * main_fiber_context
zend_class_entry * fake_scope
zend_array ** symtable_cache_limit
void * reserved[ZEND_MAX_RESERVED_RESOURCES]
zend_ini_entry * error_reporting_ini_entry
zend_array ** symtable_cache_ptr
zend_array * symtable_cache[SYMTABLE_CACHE_SIZE]
struct _zend_execute_data * current_execute_data
zend_error_handling_t error_handling
zend_strtod_state strtod_state
uint32_t persistent_classes_count
zend_objects_store objects_store
zend_function trampoline
const zend_op * opline_before_exception
HashTableIterator ht_iterators_slots[16]
HashTable * modified_ini_directives
zend_stack user_error_handlers
zend_string * filename_override
zend_object * exception
HashTableIterator * ht_iterators
zend_atomic_bool vm_interrupt
zend_fiber * active_fiber
zend_long exception_string_param_max_len
zend_fiber_context * current_fiber_context
uint32_t persistent_constants_count
zend_object * prev_exception
zend_stack user_error_handlers_error_reporting
uint32_t persistent_functions_count
zend_execute_data * current_observed_frame
zend_class_entry * exception_class
Definition zend_ini.h:47
const unsigned char * yy_cursor
const unsigned char * yy_start
zend_file_handle * yy_in
const unsigned char * yy_marker
const unsigned char * yy_text
zend_file_handle * yy_out
const unsigned char * yy_limit
zend_file_handle * yy_in
zend_file_handle * yy_out
unsigned char * yy_marker
zend_encoding_filter input_filter
zend_encoding_filter output_filter
void(* on_event)(zend_php_scanner_event event, int token, int line, const char *text, size_t length, void *context)
zend_ptr_stack heredoc_label_stack
const zend_encoding * script_encoding
unsigned char * script_org
unsigned char * yy_cursor
unsigned char * script_filtered
Definition dce.c:49
struct _zend_error_info zend_error_info
zend_error_handling_t
Definition zend.h:431
struct _zend_arena zend_arena
Definition zend_arena.h:26
struct zend_atomic_bool_s zend_atomic_bool
struct _zval_struct zval
struct _zend_oparray_context zend_oparray_context
struct _zend_op zend_op
struct _zend_file_context zend_file_context
struct _zend_op_array zend_op_array
#define ZEND_API
ZEND_API void(ZEND_FASTCALL *zend_touch_vm_stack_data)(void *vm_stack_data)
#define XPFPA_CW_DATATYPE
Definition zend_float.h:404
union _zend_function zend_function
struct _zend_fiber_context zend_fiber_context
zend_memoize_mode
@ ZEND_MEMOIZE_NONE
@ ZEND_MEMOIZE_FETCH
@ ZEND_MEMOIZE_COMPILE
struct _zend_ini_entry zend_ini_entry
struct _zend_vm_stack * zend_vm_stack
#define SYMTABLE_CACHE_SIZE
struct _zend_fiber zend_fiber
zend_php_scanner_event
@ ON_TOKEN
@ ON_STOP
@ ON_FEEDBACK
struct _zend_file_handle zend_file_handle
struct _zend_lazy_objects_store zend_lazy_objects_store
struct _zend_llist zend_llist
int32_t zend_long
Definition zend_long.h:42
uint32_t zend_ulong
Definition zend_long.h:43
struct _zend_string zend_string
size_t(* zend_encoding_filter)(unsigned char **str, size_t *str_length, const unsigned char *buf, size_t length)
struct _zend_encoding zend_encoding
struct _zend_objects_store zend_objects_store
#define END_EXTERN_C()
#define JMP_BUF
#define ZEND_MAX_RESERVED_RESOURCES
#define BEGIN_EXTERN_C()
struct _zend_array zend_array
struct _zend_class_entry zend_class_entry
struct _zend_object zend_object
struct _zend_ptr_stack zend_ptr_stack
struct _zend_stack zend_stack
struct _zend_strtod_state zend_strtod_state
struct _zend_array HashTable
Definition zend_types.h:386
struct _HashTableIterator HashTableIterator
struct _zend_ast zend_ast
Definition zend_types.h:102
struct _zend_execute_data zend_execute_data
Definition zend_types.h:91