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_compile.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_COMPILE_H
21
#define ZEND_COMPILE_H
22
23
#include "zend_ast.h"
24
#include "zend_types.h"
25
#include "zend_map_ptr.h"
26
#include "zend_alloc.h"
27
#include "zend_vm_opcodes.h"
28
29
#include <stdarg.h>
30
#include <stdint.h>
31
32
#include "zend_llist.h"
33
#include "zend_frameless_function.h"
34
#include "zend_property_hooks.h"
35
36
175M
#define SET_UNUSED(op) do { \
37
175M
  op ## _type = IS_UNUSED; \
38
175M
  op.num = (uint32_t) -1; \
39
175M
} while (0)
40
41
58.0M
#define MAKE_NOP(opline) do { \
42
58.0M
  (opline)->opcode = ZEND_NOP; \
43
58.0M
  SET_UNUSED((opline)->op1); \
44
58.0M
  SET_UNUSED((opline)->op2); \
45
58.0M
  SET_UNUSED((opline)->result); \
46
58.0M
} while (0)
47
48
1.13M
#define RESET_DOC_COMMENT() do { \
49
1.13M
  if (CG(doc_comment)) { \
50
6.73k
    zend_string_release_ex(CG(doc_comment), 0); \
51
6.73k
    CG(doc_comment) = NULL; \
52
6.73k
  } \
53
1.13M
} while (0)
54
55
typedef struct _zend_op_array zend_op_array;
56
typedef struct _zend_op zend_op;
57
58
/* On 64-bit systems less optimal, but more compact VM code leads to better
59
 * performance. So on 32-bit systems we use absolute addresses for jump
60
 * targets and constants, but on 64-bit systems relative 32-bit offsets */
61
#if SIZEOF_SIZE_T == 4
62
# define ZEND_USE_ABS_JMP_ADDR      1
63
# define ZEND_USE_ABS_CONST_ADDR    1
64
#else
65
# define ZEND_USE_ABS_JMP_ADDR      0
66
447k
# define ZEND_USE_ABS_CONST_ADDR    0
67
#endif
68
69
typedef union _znode_op {
70
  uint32_t      constant;
71
  uint32_t      var;
72
  uint32_t      num;
73
  uint32_t      opline_num; /*  Needs to be signed */
74
#if ZEND_USE_ABS_JMP_ADDR
75
  zend_op       *jmp_addr;
76
#else
77
  uint32_t      jmp_offset;
78
#endif
79
#if ZEND_USE_ABS_CONST_ADDR
80
  zval          *zv;
81
#endif
82
} znode_op;
83
84
typedef struct _znode { /* used only during compilation */
85
  uint8_t op_type;
86
  uint8_t flag;
87
  union {
88
    znode_op op;
89
    zval constant; /* replaced by literal/zv */
90
  } u;
91
} znode;
92
93
typedef struct _zend_ast_znode {
94
  zend_ast_kind kind;
95
  zend_ast_attr attr;
96
  uint32_t lineno;
97
  znode node;
98
} zend_ast_znode;
99
100
ZEND_API zend_ast * ZEND_FASTCALL zend_ast_create_znode(const znode *node);
101
102
238k
static zend_always_inline znode *zend_ast_get_znode(zend_ast *ast) {
103
238k
  return &((zend_ast_znode *) ast)->node;
104
238k
}
Unexecuted instantiation: php_date.c:zend_ast_get_znode
Unexecuted instantiation: php_pcre.c:zend_ast_get_znode
Unexecuted instantiation: exif.c:zend_ast_get_znode
Unexecuted instantiation: hash_adler32.c:zend_ast_get_znode
Unexecuted instantiation: hash_crc32.c:zend_ast_get_znode
Unexecuted instantiation: hash_fnv.c:zend_ast_get_znode
Unexecuted instantiation: hash_gost.c:zend_ast_get_znode
Unexecuted instantiation: hash_haval.c:zend_ast_get_znode
Unexecuted instantiation: hash_joaat.c:zend_ast_get_znode
Unexecuted instantiation: hash_md.c:zend_ast_get_znode
Unexecuted instantiation: hash_murmur.c:zend_ast_get_znode
Unexecuted instantiation: hash_ripemd.c:zend_ast_get_znode
Unexecuted instantiation: hash_sha_ni.c:zend_ast_get_znode
Unexecuted instantiation: hash_sha_sse2.c:zend_ast_get_znode
Unexecuted instantiation: hash_sha.c:zend_ast_get_znode
Unexecuted instantiation: hash_sha3.c:zend_ast_get_znode
Unexecuted instantiation: hash_snefru.c:zend_ast_get_znode
Unexecuted instantiation: hash_tiger.c:zend_ast_get_znode
Unexecuted instantiation: hash_whirlpool.c:zend_ast_get_znode
Unexecuted instantiation: hash_xxhash.c:zend_ast_get_znode
Unexecuted instantiation: hash.c:zend_ast_get_znode
Unexecuted instantiation: json_encoder.c:zend_ast_get_znode
Unexecuted instantiation: json_parser.tab.c:zend_ast_get_znode
Unexecuted instantiation: json_scanner.c:zend_ast_get_znode
Unexecuted instantiation: json.c:zend_ast_get_znode
Unexecuted instantiation: php_lexbor.c:zend_ast_get_znode
Unexecuted instantiation: shared_alloc_mmap.c:zend_ast_get_znode
Unexecuted instantiation: shared_alloc_posix.c:zend_ast_get_znode
Unexecuted instantiation: shared_alloc_shm.c:zend_ast_get_znode
Unexecuted instantiation: zend_accelerator_api.c:zend_ast_get_znode
Unexecuted instantiation: zend_accelerator_blacklist.c:zend_ast_get_znode
Unexecuted instantiation: zend_accelerator_debug.c:zend_ast_get_znode
Unexecuted instantiation: zend_accelerator_hash.c:zend_ast_get_znode
Unexecuted instantiation: zend_accelerator_module.c:zend_ast_get_znode
Unexecuted instantiation: zend_accelerator_util_funcs.c:zend_ast_get_znode
Unexecuted instantiation: zend_file_cache.c:zend_ast_get_znode
Unexecuted instantiation: zend_persist_calc.c:zend_ast_get_znode
Unexecuted instantiation: zend_persist.c:zend_ast_get_znode
Unexecuted instantiation: zend_shared_alloc.c:zend_ast_get_znode
Unexecuted instantiation: ZendAccelerator.c:zend_ast_get_znode
Unexecuted instantiation: zend_jit_vm_helpers.c:zend_ast_get_znode
Unexecuted instantiation: zend_jit.c:zend_ast_get_znode
Unexecuted instantiation: csprng.c:zend_ast_get_znode
Unexecuted instantiation: engine_mt19937.c:zend_ast_get_znode
Unexecuted instantiation: engine_pcgoneseq128xslrr64.c:zend_ast_get_znode
Unexecuted instantiation: engine_secure.c:zend_ast_get_znode
Unexecuted instantiation: engine_user.c:zend_ast_get_znode
Unexecuted instantiation: engine_xoshiro256starstar.c:zend_ast_get_znode
Unexecuted instantiation: gammasection.c:zend_ast_get_znode
Unexecuted instantiation: random.c:zend_ast_get_znode
Unexecuted instantiation: randomizer.c:zend_ast_get_znode
Unexecuted instantiation: zend_utils.c:zend_ast_get_znode
Unexecuted instantiation: php_reflection.c:zend_ast_get_znode
Unexecuted instantiation: php_spl.c:zend_ast_get_znode
Unexecuted instantiation: spl_array.c:zend_ast_get_znode
Unexecuted instantiation: spl_directory.c:zend_ast_get_znode
Unexecuted instantiation: spl_dllist.c:zend_ast_get_znode
Unexecuted instantiation: spl_exceptions.c:zend_ast_get_znode
Unexecuted instantiation: spl_fixedarray.c:zend_ast_get_znode
Unexecuted instantiation: spl_functions.c:zend_ast_get_znode
Unexecuted instantiation: spl_heap.c:zend_ast_get_znode
Unexecuted instantiation: spl_iterators.c:zend_ast_get_znode
Unexecuted instantiation: spl_observer.c:zend_ast_get_znode
Unexecuted instantiation: array.c:zend_ast_get_znode
Unexecuted instantiation: assert.c:zend_ast_get_znode
Unexecuted instantiation: base64.c:zend_ast_get_znode
Unexecuted instantiation: basic_functions.c:zend_ast_get_znode
Unexecuted instantiation: browscap.c:zend_ast_get_znode
Unexecuted instantiation: crc32_x86.c:zend_ast_get_znode
Unexecuted instantiation: crc32.c:zend_ast_get_znode
Unexecuted instantiation: credits.c:zend_ast_get_znode
Unexecuted instantiation: crypt.c:zend_ast_get_znode
Unexecuted instantiation: css.c:zend_ast_get_znode
Unexecuted instantiation: datetime.c:zend_ast_get_znode
Unexecuted instantiation: dir.c:zend_ast_get_znode
Unexecuted instantiation: dl.c:zend_ast_get_znode
Unexecuted instantiation: dns.c:zend_ast_get_znode
Unexecuted instantiation: exec.c:zend_ast_get_znode
Unexecuted instantiation: file.c:zend_ast_get_znode
Unexecuted instantiation: filestat.c:zend_ast_get_znode
Unexecuted instantiation: filters.c:zend_ast_get_znode
Unexecuted instantiation: flock_compat.c:zend_ast_get_znode
Unexecuted instantiation: formatted_print.c:zend_ast_get_znode
Unexecuted instantiation: fsock.c:zend_ast_get_znode
Unexecuted instantiation: ftok.c:zend_ast_get_znode
Unexecuted instantiation: ftp_fopen_wrapper.c:zend_ast_get_znode
Unexecuted instantiation: head.c:zend_ast_get_znode
Unexecuted instantiation: hrtime.c:zend_ast_get_znode
Unexecuted instantiation: html.c:zend_ast_get_znode
Unexecuted instantiation: http_fopen_wrapper.c:zend_ast_get_znode
Unexecuted instantiation: http.c:zend_ast_get_znode
Unexecuted instantiation: image.c:zend_ast_get_znode
Unexecuted instantiation: incomplete_class.c:zend_ast_get_znode
Unexecuted instantiation: info.c:zend_ast_get_znode
Unexecuted instantiation: iptc.c:zend_ast_get_znode
Unexecuted instantiation: levenshtein.c:zend_ast_get_znode
Unexecuted instantiation: link.c:zend_ast_get_znode
Unexecuted instantiation: mail.c:zend_ast_get_znode
Unexecuted instantiation: math.c:zend_ast_get_znode
Unexecuted instantiation: md5.c:zend_ast_get_znode
Unexecuted instantiation: metaphone.c:zend_ast_get_znode
Unexecuted instantiation: microtime.c:zend_ast_get_znode
Unexecuted instantiation: net.c:zend_ast_get_znode
Unexecuted instantiation: pack.c:zend_ast_get_znode
Unexecuted instantiation: pageinfo.c:zend_ast_get_znode
Unexecuted instantiation: password.c:zend_ast_get_znode
Unexecuted instantiation: php_fopen_wrapper.c:zend_ast_get_znode
Unexecuted instantiation: proc_open.c:zend_ast_get_znode
Unexecuted instantiation: quot_print.c:zend_ast_get_znode
Unexecuted instantiation: scanf.c:zend_ast_get_znode
Unexecuted instantiation: sha1.c:zend_ast_get_znode
Unexecuted instantiation: soundex.c:zend_ast_get_znode
Unexecuted instantiation: streamsfuncs.c:zend_ast_get_znode
Unexecuted instantiation: string.c:zend_ast_get_znode
Unexecuted instantiation: strnatcmp.c:zend_ast_get_znode
Unexecuted instantiation: syslog.c:zend_ast_get_znode
Unexecuted instantiation: type.c:zend_ast_get_znode
Unexecuted instantiation: uniqid.c:zend_ast_get_znode
Unexecuted instantiation: url_scanner_ex.c:zend_ast_get_znode
Unexecuted instantiation: url.c:zend_ast_get_znode
Unexecuted instantiation: user_filters.c:zend_ast_get_znode
Unexecuted instantiation: uuencode.c:zend_ast_get_znode
Unexecuted instantiation: var_unserializer.c:zend_ast_get_znode
Unexecuted instantiation: var.c:zend_ast_get_znode
Unexecuted instantiation: versioning.c:zend_ast_get_znode
Unexecuted instantiation: crypt_sha256.c:zend_ast_get_znode
Unexecuted instantiation: crypt_sha512.c:zend_ast_get_znode
Unexecuted instantiation: php_crypt_r.c:zend_ast_get_znode
Unexecuted instantiation: php_uri.c:zend_ast_get_znode
Unexecuted instantiation: php_uri_common.c:zend_ast_get_znode
Unexecuted instantiation: uri_parser_rfc3986.c:zend_ast_get_znode
Unexecuted instantiation: uri_parser_whatwg.c:zend_ast_get_znode
Unexecuted instantiation: uri_parser_php_parse_url.c:zend_ast_get_znode
Unexecuted instantiation: explicit_bzero.c:zend_ast_get_znode
Unexecuted instantiation: fopen_wrappers.c:zend_ast_get_znode
Unexecuted instantiation: getopt.c:zend_ast_get_znode
Unexecuted instantiation: main.c:zend_ast_get_znode
Unexecuted instantiation: network.c:zend_ast_get_znode
Unexecuted instantiation: output.c:zend_ast_get_znode
Unexecuted instantiation: php_content_types.c:zend_ast_get_znode
Unexecuted instantiation: php_ini_builder.c:zend_ast_get_znode
Unexecuted instantiation: php_ini.c:zend_ast_get_znode
Unexecuted instantiation: php_glob.c:zend_ast_get_znode
Unexecuted instantiation: php_odbc_utils.c:zend_ast_get_znode
Unexecuted instantiation: php_open_temporary_file.c:zend_ast_get_znode
Unexecuted instantiation: php_scandir.c:zend_ast_get_znode
Unexecuted instantiation: php_syslog.c:zend_ast_get_znode
Unexecuted instantiation: php_ticks.c:zend_ast_get_znode
Unexecuted instantiation: php_variables.c:zend_ast_get_znode
Unexecuted instantiation: reentrancy.c:zend_ast_get_znode
Unexecuted instantiation: rfc1867.c:zend_ast_get_znode
Unexecuted instantiation: safe_bcmp.c:zend_ast_get_znode
Unexecuted instantiation: SAPI.c:zend_ast_get_znode
Unexecuted instantiation: snprintf.c:zend_ast_get_znode
Unexecuted instantiation: spprintf.c:zend_ast_get_znode
Unexecuted instantiation: strlcat.c:zend_ast_get_znode
Unexecuted instantiation: strlcpy.c:zend_ast_get_znode
Unexecuted instantiation: cast.c:zend_ast_get_znode
Unexecuted instantiation: filter.c:zend_ast_get_znode
Unexecuted instantiation: glob_wrapper.c:zend_ast_get_znode
Unexecuted instantiation: memory.c:zend_ast_get_znode
Unexecuted instantiation: mmap.c:zend_ast_get_znode
Unexecuted instantiation: plain_wrapper.c:zend_ast_get_znode
Unexecuted instantiation: streams.c:zend_ast_get_znode
Unexecuted instantiation: transports.c:zend_ast_get_znode
Unexecuted instantiation: userspace.c:zend_ast_get_znode
Unexecuted instantiation: xp_socket.c:zend_ast_get_znode
Unexecuted instantiation: block_pass.c:zend_ast_get_znode
Unexecuted instantiation: compact_literals.c:zend_ast_get_znode
Unexecuted instantiation: compact_vars.c:zend_ast_get_znode
Unexecuted instantiation: dce.c:zend_ast_get_znode
Unexecuted instantiation: dfa_pass.c:zend_ast_get_znode
Unexecuted instantiation: escape_analysis.c:zend_ast_get_znode
Unexecuted instantiation: nop_removal.c:zend_ast_get_znode
Unexecuted instantiation: optimize_func_calls.c:zend_ast_get_znode
Unexecuted instantiation: optimize_temp_vars_5.c:zend_ast_get_znode
Unexecuted instantiation: pass1.c:zend_ast_get_znode
Unexecuted instantiation: pass3.c:zend_ast_get_znode
Unexecuted instantiation: sccp.c:zend_ast_get_znode
Unexecuted instantiation: scdf.c:zend_ast_get_znode
Unexecuted instantiation: zend_call_graph.c:zend_ast_get_znode
Unexecuted instantiation: zend_cfg.c:zend_ast_get_znode
Unexecuted instantiation: zend_dfg.c:zend_ast_get_znode
Unexecuted instantiation: zend_dump.c:zend_ast_get_znode
Unexecuted instantiation: zend_func_info.c:zend_ast_get_znode
Unexecuted instantiation: zend_inference.c:zend_ast_get_znode
Unexecuted instantiation: zend_optimizer.c:zend_ast_get_znode
Unexecuted instantiation: zend_ssa.c:zend_ast_get_znode
Unexecuted instantiation: zend_alloc.c:zend_ast_get_znode
Unexecuted instantiation: zend_API.c:zend_ast_get_znode
Unexecuted instantiation: zend_ast.c:zend_ast_get_znode
Unexecuted instantiation: zend_attributes.c:zend_ast_get_znode
Unexecuted instantiation: zend_builtin_functions.c:zend_ast_get_znode
Unexecuted instantiation: zend_call_stack.c:zend_ast_get_znode
Unexecuted instantiation: zend_closures.c:zend_ast_get_znode
zend_compile.c:zend_ast_get_znode
Line
Count
Source
102
238k
static zend_always_inline znode *zend_ast_get_znode(zend_ast *ast) {
103
238k
  return &((zend_ast_znode *) ast)->node;
104
238k
}
Unexecuted instantiation: zend_constants.c:zend_ast_get_znode
Unexecuted instantiation: zend_default_classes.c:zend_ast_get_znode
Unexecuted instantiation: zend_dtrace.c:zend_ast_get_znode
Unexecuted instantiation: zend_enum.c:zend_ast_get_znode
Unexecuted instantiation: zend_exceptions.c:zend_ast_get_znode
Unexecuted instantiation: zend_execute_API.c:zend_ast_get_znode
Unexecuted instantiation: zend_execute.c:zend_ast_get_znode
Unexecuted instantiation: zend_extensions.c:zend_ast_get_znode
Unexecuted instantiation: zend_fibers.c:zend_ast_get_znode
Unexecuted instantiation: zend_float.c:zend_ast_get_znode
Unexecuted instantiation: zend_gc.c:zend_ast_get_znode
Unexecuted instantiation: zend_generators.c:zend_ast_get_znode
Unexecuted instantiation: zend_hash.c:zend_ast_get_znode
Unexecuted instantiation: zend_highlight.c:zend_ast_get_znode
Unexecuted instantiation: zend_inheritance.c:zend_ast_get_znode
Unexecuted instantiation: zend_ini_parser.c:zend_ast_get_znode
Unexecuted instantiation: zend_ini_scanner.c:zend_ast_get_znode
Unexecuted instantiation: zend_ini.c:zend_ast_get_znode
Unexecuted instantiation: zend_interfaces.c:zend_ast_get_znode
Unexecuted instantiation: zend_iterators.c:zend_ast_get_znode
Unexecuted instantiation: zend_language_parser.c:zend_ast_get_znode
Unexecuted instantiation: zend_language_scanner.c:zend_ast_get_znode
Unexecuted instantiation: zend_lazy_objects.c:zend_ast_get_znode
Unexecuted instantiation: zend_list.c:zend_ast_get_znode
Unexecuted instantiation: zend_multibyte.c:zend_ast_get_znode
Unexecuted instantiation: zend_object_handlers.c:zend_ast_get_znode
Unexecuted instantiation: zend_objects_API.c:zend_ast_get_znode
Unexecuted instantiation: zend_objects.c:zend_ast_get_znode
Unexecuted instantiation: zend_observer.c:zend_ast_get_znode
Unexecuted instantiation: zend_opcode.c:zend_ast_get_znode
Unexecuted instantiation: zend_operators.c:zend_ast_get_znode
Unexecuted instantiation: zend_property_hooks.c:zend_ast_get_znode
Unexecuted instantiation: zend_signal.c:zend_ast_get_znode
Unexecuted instantiation: zend_smart_str.c:zend_ast_get_znode
Unexecuted instantiation: zend_stream.c:zend_ast_get_znode
Unexecuted instantiation: zend_string.c:zend_ast_get_znode
Unexecuted instantiation: zend_strtod.c:zend_ast_get_znode
Unexecuted instantiation: zend_system_id.c:zend_ast_get_znode
Unexecuted instantiation: zend_variables.c:zend_ast_get_znode
Unexecuted instantiation: zend_weakrefs.c:zend_ast_get_znode
Unexecuted instantiation: zend.c:zend_ast_get_znode
Unexecuted instantiation: internal_functions_cli.c:zend_ast_get_znode
Unexecuted instantiation: fuzzer-parser.c:zend_ast_get_znode
Unexecuted instantiation: fuzzer-sapi.c:zend_ast_get_znode
Unexecuted instantiation: fuzzer-tracing-jit.c:zend_ast_get_znode
Unexecuted instantiation: fuzzer-exif.c:zend_ast_get_znode
Unexecuted instantiation: fuzzer-unserialize.c:zend_ast_get_znode
Unexecuted instantiation: fuzzer-function-jit.c:zend_ast_get_znode
Unexecuted instantiation: fuzzer-json.c:zend_ast_get_znode
Unexecuted instantiation: fuzzer-unserializehash.c:zend_ast_get_znode
Unexecuted instantiation: fuzzer-execute.c:zend_ast_get_znode
105
106
typedef struct _zend_declarables {
107
  zend_long ticks;
108
} zend_declarables;
109
110
/* Compilation context that is different for each file, but shared between op arrays. */
111
typedef struct _zend_file_context {
112
  zend_declarables declarables;
113
114
  zend_string *current_namespace;
115
  bool in_namespace;
116
  bool has_bracketed_namespaces;
117
118
  HashTable *imports;
119
  HashTable *imports_function;
120
  HashTable *imports_const;
121
122
  HashTable seen_symbols;
123
} zend_file_context;
124
125
typedef union _zend_parser_stack_elem {
126
  zend_ast *ast;
127
  zend_string *str;
128
  zend_ulong num;
129
  unsigned char *ptr;
130
  unsigned char *ident;
131
} zend_parser_stack_elem;
132
133
void zend_compile_top_stmt(zend_ast *ast);
134
void zend_const_expr_to_zval(zval *result, zend_ast **ast_ptr, bool allow_dynamic);
135
136
typedef int (*user_opcode_handler_t) (zend_execute_data *execute_data);
137
138
struct _zend_op {
139
  zend_vm_opcode_handler_t handler;
140
  znode_op op1;
141
  znode_op op2;
142
  znode_op result;
143
  uint32_t extended_value;
144
  uint32_t lineno;
145
  uint8_t opcode;       /* Opcodes defined in Zend/zend_vm_opcodes.h */
146
  uint8_t op1_type;     /* IS_UNUSED, IS_CONST, IS_TMP_VAR, IS_VAR, IS_CV */
147
  uint8_t op2_type;     /* IS_UNUSED, IS_CONST, IS_TMP_VAR, IS_VAR, IS_CV */
148
  uint8_t result_type;  /* IS_UNUSED, IS_CONST, IS_TMP_VAR, IS_VAR, IS_CV */
149
#ifdef ZEND_VERIFY_TYPE_INFERENCE
150
  uint32_t op1_use_type;
151
  uint32_t op2_use_type;
152
  uint32_t result_use_type;
153
  uint32_t op1_def_type;
154
  uint32_t op2_def_type;
155
  uint32_t result_def_type;
156
#endif
157
};
158
159
160
typedef struct _zend_brk_cont_element {
161
  int start;
162
  int cont;
163
  int brk;
164
  int parent;
165
  bool is_switch;
166
} zend_brk_cont_element;
167
168
typedef struct _zend_label {
169
  int brk_cont;
170
  uint32_t opline_num;
171
} zend_label;
172
173
typedef struct _zend_try_catch_element {
174
  uint32_t try_op;
175
  uint32_t catch_op;  /* ketchup! */
176
  uint32_t finally_op;
177
  uint32_t finally_end;
178
} zend_try_catch_element;
179
180
4.31M
#define ZEND_LIVE_TMPVAR  0
181
36.1k
#define ZEND_LIVE_LOOP    1
182
11.5M
#define ZEND_LIVE_SILENCE 2
183
51.1k
#define ZEND_LIVE_ROPE    3
184
414k
#define ZEND_LIVE_NEW     4
185
592k
#define ZEND_LIVE_MASK    7
186
187
typedef struct _zend_live_range {
188
  uint32_t var; /* low bits are used for variable type (ZEND_LIVE_* macros) */
189
  uint32_t start;
190
  uint32_t end;
191
} zend_live_range;
192
193
typedef struct _zend_property_info zend_property_info;
194
195
/* Compilation context that is different for each op array. */
196
typedef struct _zend_oparray_context {
197
  struct _zend_oparray_context *prev;
198
  zend_op_array *op_array;
199
  uint32_t   opcodes_size;
200
  uint32_t   vars_size;
201
  uint32_t   literals_size;
202
  uint32_t   fast_call_var;
203
  uint32_t   try_catch_offset;
204
  int        current_brk_cont;
205
  int        last_brk_cont;
206
  zend_brk_cont_element *brk_cont_array;
207
  HashTable *labels;
208
  zend_string *active_property_info_name;
209
  zend_property_hook_kind active_property_hook_kind;
210
  bool       in_jmp_frameless_branch;
211
  bool has_assigned_to_http_response_header;
212
} zend_oparray_context;
213
214
/* Class, property and method flags                  class|meth.|prop.|const*/
215
/*                                                        |     |     |     */
216
/* Common flags                                           |     |     |     */
217
/* ============                                           |     |     |     */
218
/*                                                        |     |     |     */
219
/* Visibility flags (public < protected < private)        |     |     |     */
220
1.56M
#define ZEND_ACC_PUBLIC                  (1 <<  0) /*     |  X  |  X  |  X  */
221
15.7M
#define ZEND_ACC_PROTECTED               (1 <<  1) /*     |  X  |  X  |  X  */
222
16.4M
#define ZEND_ACC_PRIVATE                 (1 <<  2) /*     |  X  |  X  |  X  */
223
/*                                                        |     |     |     */
224
/* Property or method overrides private one               |     |     |     */
225
15.0M
#define ZEND_ACC_CHANGED                 (1 <<  3) /*     |  X  |  X  |     */
226
/*                                                        |     |     |     */
227
/* Static method or property                              |     |     |     */
228
749k
#define ZEND_ACC_STATIC                  (1 <<  4) /*     |  X  |  X  |     */
229
/*                                                        |     |     |     */
230
/* Final class or method                                  |     |     |     */
231
1.16M
#define ZEND_ACC_FINAL                   (1 <<  5) /*  X  |  X  |  X  |  X  */
232
/*                                                        |     |     |     */
233
/* Abstract method                                        |     |     |     */
234
380k
#define ZEND_ACC_ABSTRACT                (1 <<  6) /*  X  |  X  |  X  |     */
235
132k
#define ZEND_ACC_EXPLICIT_ABSTRACT_CLASS (1 <<  6) /*  X  |     |     |     */
236
/*                                                        |     |     |     */
237
/* Readonly property                                      |     |     |     */
238
1.22M
#define ZEND_ACC_READONLY                (1 <<  7) /*     |     |  X  |     */
239
/*                                                        |     |     |     */
240
/* Immutable op_array and class_entries                   |     |     |     */
241
/* (implemented only for lazy loading of op_arrays)       |     |     |     */
242
414k
#define ZEND_ACC_IMMUTABLE               (1 <<  7) /*  X  |  X  |     |     */
243
/*                                                        |     |     |     */
244
/* Function has typed arguments / class has typed props   |     |     |     */
245
1.70M
#define ZEND_ACC_HAS_TYPE_HINTS          (1 <<  8) /*  X  |  X  |     |     */
246
/*                                                        |     |     |     */
247
/* Top-level class or function declaration                |     |     |     */
248
54.5k
#define ZEND_ACC_TOP_LEVEL               (1 <<  9) /*  X  |  X  |     |     */
249
/*                                                        |     |     |     */
250
/* op_array or class is preloaded                         |     |     |     */
251
78.6k
#define ZEND_ACC_PRELOADED               (1 << 10) /*  X  |  X  |     |     */
252
/*                                                        |     |     |     */
253
/* Flag to differentiate cases from constants.            |     |     |     */
254
/* Must not conflict with ZEND_ACC_ visibility flags      |     |     |     */
255
/* or IS_CONSTANT_VISITED_MARK                            |     |     |     */
256
3.91k
#define ZEND_CLASS_CONST_IS_CASE         (1 <<  6) /*     |     |     |  X  */
257
/*                                                        |     |     |     */
258
/* deprecation flag                                       |     |     |     */
259
82.3k
#define ZEND_ACC_DEPRECATED              (1 << 11) /*  X  |  X  |     |  X  */
260
/*                                                        |     |     |     */
261
/* has #[\Override] attribute                             |     |     |     */
262
95.0k
#define ZEND_ACC_OVERRIDE                (1 << 28) /*     |  X  |  X  |     */
263
/*                                                        |     |     |     */
264
/* Property Flags (unused: 13-27,29...)                   |     |     |     */
265
/* ===========                                            |     |     |     */
266
/*                                                        |     |     |     */
267
/* Promoted property / parameter                          |     |     |     */
268
894
#define ZEND_ACC_PROMOTED                (1 <<  8) /*     |     |  X  |     */
269
/*                                                        |     |     |     */
270
/* Virtual property without backing storage               |     |     |     */
271
252k
#define ZEND_ACC_VIRTUAL                 (1 <<  9) /*     |     |  X  |     */
272
/*                                                        |     |     |     */
273
/* Asymmetric visibility                                  |     |     |     */
274
1.11M
#define ZEND_ACC_PUBLIC_SET              (1 << 10) /*     |     |  X  |     */
275
1.11M
#define ZEND_ACC_PROTECTED_SET           (1 << 11) /*     |     |  X  |     */
276
1.11M
#define ZEND_ACC_PRIVATE_SET             (1 << 12) /*     |     |  X  |     */
277
/*                                                        |     |     |     */
278
/* Class Flags (unused: 31)                               |     |     |     */
279
/* ===========                                            |     |     |     */
280
/*                                                        |     |     |     */
281
/* Special class types                                    |     |     |     */
282
16.0M
#define ZEND_ACC_INTERFACE               (1 <<  0) /*  X  |     |     |     */
283
305k
#define ZEND_ACC_TRAIT                   (1 <<  1) /*  X  |     |     |     */
284
694k
#define ZEND_ACC_ANON_CLASS              (1 <<  2) /*  X  |     |     |     */
285
270k
#define ZEND_ACC_ENUM                    (1 << 28) /*  X  |     |     |     */
286
/*                                                        |     |     |     */
287
/* Class linked with parent, interfaces and traits        |     |     |     */
288
758k
#define ZEND_ACC_LINKED                  (1 <<  3) /*  X  |     |     |     */
289
/*                                                        |     |     |     */
290
/* Class is abstract, since it is set by any              |     |     |     */
291
/* abstract method                                        |     |     |     */
292
219k
#define ZEND_ACC_IMPLICIT_ABSTRACT_CLASS (1 <<  4) /*  X  |     |     |     */
293
/*                                                        |     |     |     */
294
/* Class has magic methods __get/__set/__unset/           |     |     |     */
295
/* __isset that use guards                                |     |     |     */
296
3.49M
#define ZEND_ACC_USE_GUARDS              (1 << 30) /*  X  |     |     |     */
297
/*                                                        |     |     |     */
298
/* Class constants updated                                |     |     |     */
299
129k
#define ZEND_ACC_CONSTANTS_UPDATED       (1 << 12) /*  X  |     |     |     */
300
/*                                                        |     |     |     */
301
/* Objects of this class may not have dynamic properties  |     |     |     */
302
5.56k
#define ZEND_ACC_NO_DYNAMIC_PROPERTIES   (1 << 13) /*  X  |     |     |     */
303
/*                                                        |     |     |     */
304
/* User class has methods with static variables           |     |     |     */
305
40.9M
#define ZEND_HAS_STATIC_IN_METHODS       (1 << 14) /*  X  |     |     |     */
306
/*                                                        |     |     |     */
307
/* Objects of this class may have dynamic properties      |     |     |     */
308
/* without triggering a deprecation warning               |     |     |     */
309
762k
#define ZEND_ACC_ALLOW_DYNAMIC_PROPERTIES (1 << 15) /* X  |     |     |     */
310
/*                                                        |     |     |     */
311
/* Readonly class                                         |     |     |     */
312
40.3k
#define ZEND_ACC_READONLY_CLASS          (1 << 16) /*  X  |     |     |     */
313
/*                                                        |     |     |     */
314
/* Parent class is resolved (CE).                         |     |     |     */
315
31.6k
#define ZEND_ACC_RESOLVED_PARENT         (1 << 17) /*  X  |     |     |     */
316
/*                                                        |     |     |     */
317
/* Interfaces are resolved (CEs).                         |     |     |     */
318
20.5k
#define ZEND_ACC_RESOLVED_INTERFACES     (1 << 18) /*  X  |     |     |     */
319
/*                                                        |     |     |     */
320
/* Class has unresolved variance obligations.             |     |     |     */
321
6.92k
#define ZEND_ACC_UNRESOLVED_VARIANCE     (1 << 19) /*  X  |     |     |     */
322
/*                                                        |     |     |     */
323
/* Class is linked apart from variance obligations.       |     |     |     */
324
969
#define ZEND_ACC_NEARLY_LINKED           (1 << 20) /*  X  |     |     |     */
325
/* Class has readonly props                               |     |     |     */
326
14.3k
#define ZEND_ACC_HAS_READONLY_PROPS      (1 << 21) /*  X  |     |     |     */
327
/*                                                        |     |     |     */
328
/* stored in opcache (may be partially)                   |     |     |     */
329
244k
#define ZEND_ACC_CACHED                  (1 << 22) /*  X  |     |     |     */
330
/*                                                        |     |     |     */
331
/* temporary flag used during delayed variance checks     |     |     |     */
332
1.24k
#define ZEND_ACC_CACHEABLE               (1 << 23) /*  X  |     |     |     */
333
/*                                                        |     |     |     */
334
11.2k
#define ZEND_ACC_HAS_AST_CONSTANTS       (1 << 24) /*  X  |     |     |     */
335
873k
#define ZEND_ACC_HAS_AST_PROPERTIES      (1 << 25) /*  X  |     |     |     */
336
2.00k
#define ZEND_ACC_HAS_AST_STATICS         (1 << 26) /*  X  |     |     |     */
337
/*                                                        |     |     |     */
338
/* loaded from file cache to process memory               |     |     |     */
339
69.0k
#define ZEND_ACC_FILE_CACHED             (1 << 27) /*  X  |     |     |     */
340
/*                                                        |     |     |     */
341
/* Class cannot be serialized or unserialized             |     |     |     */
342
664k
#define ZEND_ACC_NOT_SERIALIZABLE        (1 << 29) /*  X  |     |     |     */
343
/*                                                        |     |     |     */
344
/* Class Flags 2 (ce_flags2) (unused: 0-31)               |     |     |     */
345
/* =========================                              |     |     |     */
346
/*                                                        |     |     |     */
347
/* #define ZEND_ACC2_EXAMPLE             (1 << 0)      X  |     |     |     */
348
/*                                                        |     |     |     */
349
/* Function Flags (unused: 30)                            |     |     |     */
350
/* ==============                                         |     |     |     */
351
/*                                                        |     |     |     */
352
/* Function returning by reference                        |     |     |     */
353
1.28M
#define ZEND_ACC_RETURN_REFERENCE        (1 << 12) /*     |  X  |     |     */
354
/*                                                        |     |     |     */
355
/* Function has a return type                             |     |     |     */
356
1.79M
#define ZEND_ACC_HAS_RETURN_TYPE         (1 << 13) /*     |  X  |     |     */
357
/*                                                        |     |     |     */
358
/* Function with variable number of arguments             |     |     |     */
359
3.00M
#define ZEND_ACC_VARIADIC                (1 << 14) /*     |  X  |     |     */
360
/*                                                        |     |     |     */
361
/* op_array has finally blocks (user only)                |     |     |     */
362
477k
#define ZEND_ACC_HAS_FINALLY_BLOCK       (1 << 15) /*     |  X  |     |     */
363
/*                                                        |     |     |     */
364
/* "main" op_array with                                   |     |     |     */
365
/* ZEND_DECLARE_CLASS_DELAYED opcodes                     |     |     |     */
366
59.2k
#define ZEND_ACC_EARLY_BINDING           (1 << 16) /*     |  X  |     |     */
367
/*                                                        |     |     |     */
368
/* closure uses $this                                     |     |     |     */
369
15.4k
#define ZEND_ACC_USES_THIS               (1 << 17) /*     |  X  |     |     */
370
/*                                                        |     |     |     */
371
/* call through user function trampoline. e.g.            |     |     |     */
372
/* __call, __callstatic                                   |     |     |     */
373
659k
#define ZEND_ACC_CALL_VIA_TRAMPOLINE     (1 << 18) /*     |  X  |     |     */
374
/*                                                        |     |     |     */
375
/* disable inline caching                                 |     |     |     */
376
0
#define ZEND_ACC_NEVER_CACHE             (1 << 19) /*     |  X  |     |     */
377
/*                                                        |     |     |     */
378
/* op_array is a clone of trait method                    |     |     |     */
379
65.9k
#define ZEND_ACC_TRAIT_CLONE             (1 << 20) /*     |  X  |     |     */
380
/*                                                        |     |     |     */
381
/* functions is a constructor                             |     |     |     */
382
22.2k
#define ZEND_ACC_CTOR                    (1 << 21) /*     |  X  |     |     */
383
/*                                                        |     |     |     */
384
/* Closure related                                        |     |     |     */
385
4.16M
#define ZEND_ACC_CLOSURE                 (1 << 22) /*     |  X  |     |     */
386
1.80M
#define ZEND_ACC_FAKE_CLOSURE            (1 << 23) /*     |  X  |     |     */ /* Same as ZEND_CALL_FAKE_CLOSURE */
387
/*                                                        |     |     |     */
388
2.40M
#define ZEND_ACC_GENERATOR               (1 << 24) /*     |  X  |     |     */
389
/*                                                        |     |     |     */
390
/* function was processed by pass two (user only)         |     |     |     */
391
3.04M
#define ZEND_ACC_DONE_PASS_TWO           (1 << 25) /*     |  X  |     |     */
392
/*                                                        |     |     |     */
393
/* internal function is allocated at arena (int only)     |     |     |     */
394
40.0k
#define ZEND_ACC_ARENA_ALLOCATED         (1 << 25) /*     |  X  |     |     */
395
/*                                                        |     |     |     */
396
/* run_time_cache allocated on heap (user only)           |     |     |     */
397
467k
#define ZEND_ACC_HEAP_RT_CACHE           (1 << 26) /*     |  X  |     |     */
398
/*                                                        |     |     |     */
399
/* method flag used by Closure::__invoke() (int only)     |     |     |     */
400
6.31k
#define ZEND_ACC_USER_ARG_INFO           (1 << 26) /*     |  X  |     |     */
401
/*                                                        |     |     |     */
402
/* supports opcache compile-time evaluation (funcs)       |     |     |     */
403
0
#define ZEND_ACC_COMPILE_TIME_EVAL       (1 << 27) /*     |  X  |     |     */
404
/*                                                        |     |     |     */
405
/* Has IS_PTR operands that needs special cleaning; same  |     |     |     */
406
/* value as ZEND_ACC_OVERRIDE but override is for class   |     |     |     */
407
/* methods and this is for the top level op array         |     |     |     */
408
323k
#define ZEND_ACC_PTR_OPS                 (1 << 28) /*     |  X  |     |     */
409
/*                                                        |     |     |     */
410
/* has #[\NoDiscard] attribute                            |     |     |     */
411
9.35M
#define ZEND_ACC_NODISCARD               (1 << 29) /*     |  X  |     |     */
412
/*                                                        |     |     |     */
413
/* op_array uses strict mode types                        |     |     |     */
414
5.65M
#define ZEND_ACC_STRICT_TYPES            (1U << 31) /*    |  X  |     |     */
415
/*                                                        |     |     |     */
416
/* Function Flags 2 (fn_flags2) (unused: 0-31)            |     |     |     */
417
/* ============================                           |     |     |     */
418
/*                                                        |     |     |     */
419
/* #define ZEND_ACC2_EXAMPLE             (1 << 0)         |  X  |     |     */
420
421
1.20M
#define ZEND_ACC_PPP_MASK  (ZEND_ACC_PUBLIC | ZEND_ACC_PROTECTED | ZEND_ACC_PRIVATE)
422
1.09M
#define ZEND_ACC_PPP_SET_MASK  (ZEND_ACC_PUBLIC_SET | ZEND_ACC_PROTECTED_SET | ZEND_ACC_PRIVATE_SET)
423
424
static zend_always_inline uint32_t zend_visibility_to_set_visibility(uint32_t visibility)
425
542
{
426
542
  switch (visibility) {
427
504
    case ZEND_ACC_PUBLIC:
428
504
      return ZEND_ACC_PUBLIC_SET;
429
12
    case ZEND_ACC_PROTECTED:
430
12
      return ZEND_ACC_PROTECTED_SET;
431
26
    case ZEND_ACC_PRIVATE:
432
26
      return ZEND_ACC_PRIVATE_SET;
433
0
    EMPTY_SWITCH_DEFAULT_CASE();
434
542
  }
435
542
}
Unexecuted instantiation: php_date.c:zend_visibility_to_set_visibility
Unexecuted instantiation: php_pcre.c:zend_visibility_to_set_visibility
Unexecuted instantiation: exif.c:zend_visibility_to_set_visibility
Unexecuted instantiation: hash_adler32.c:zend_visibility_to_set_visibility
Unexecuted instantiation: hash_crc32.c:zend_visibility_to_set_visibility
Unexecuted instantiation: hash_fnv.c:zend_visibility_to_set_visibility
Unexecuted instantiation: hash_gost.c:zend_visibility_to_set_visibility
Unexecuted instantiation: hash_haval.c:zend_visibility_to_set_visibility
Unexecuted instantiation: hash_joaat.c:zend_visibility_to_set_visibility
Unexecuted instantiation: hash_md.c:zend_visibility_to_set_visibility
Unexecuted instantiation: hash_murmur.c:zend_visibility_to_set_visibility
Unexecuted instantiation: hash_ripemd.c:zend_visibility_to_set_visibility
Unexecuted instantiation: hash_sha_ni.c:zend_visibility_to_set_visibility
Unexecuted instantiation: hash_sha_sse2.c:zend_visibility_to_set_visibility
Unexecuted instantiation: hash_sha.c:zend_visibility_to_set_visibility
Unexecuted instantiation: hash_sha3.c:zend_visibility_to_set_visibility
Unexecuted instantiation: hash_snefru.c:zend_visibility_to_set_visibility
Unexecuted instantiation: hash_tiger.c:zend_visibility_to_set_visibility
Unexecuted instantiation: hash_whirlpool.c:zend_visibility_to_set_visibility
Unexecuted instantiation: hash_xxhash.c:zend_visibility_to_set_visibility
Unexecuted instantiation: hash.c:zend_visibility_to_set_visibility
Unexecuted instantiation: json_encoder.c:zend_visibility_to_set_visibility
Unexecuted instantiation: json_parser.tab.c:zend_visibility_to_set_visibility
Unexecuted instantiation: json_scanner.c:zend_visibility_to_set_visibility
Unexecuted instantiation: json.c:zend_visibility_to_set_visibility
Unexecuted instantiation: php_lexbor.c:zend_visibility_to_set_visibility
Unexecuted instantiation: shared_alloc_mmap.c:zend_visibility_to_set_visibility
Unexecuted instantiation: shared_alloc_posix.c:zend_visibility_to_set_visibility
Unexecuted instantiation: shared_alloc_shm.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_accelerator_api.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_accelerator_blacklist.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_accelerator_debug.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_accelerator_hash.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_accelerator_module.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_accelerator_util_funcs.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_file_cache.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_persist_calc.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_persist.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_shared_alloc.c:zend_visibility_to_set_visibility
Unexecuted instantiation: ZendAccelerator.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_jit_vm_helpers.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_jit.c:zend_visibility_to_set_visibility
Unexecuted instantiation: csprng.c:zend_visibility_to_set_visibility
Unexecuted instantiation: engine_mt19937.c:zend_visibility_to_set_visibility
Unexecuted instantiation: engine_pcgoneseq128xslrr64.c:zend_visibility_to_set_visibility
Unexecuted instantiation: engine_secure.c:zend_visibility_to_set_visibility
Unexecuted instantiation: engine_user.c:zend_visibility_to_set_visibility
Unexecuted instantiation: engine_xoshiro256starstar.c:zend_visibility_to_set_visibility
Unexecuted instantiation: gammasection.c:zend_visibility_to_set_visibility
Unexecuted instantiation: random.c:zend_visibility_to_set_visibility
Unexecuted instantiation: randomizer.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_utils.c:zend_visibility_to_set_visibility
Unexecuted instantiation: php_reflection.c:zend_visibility_to_set_visibility
Unexecuted instantiation: php_spl.c:zend_visibility_to_set_visibility
Unexecuted instantiation: spl_array.c:zend_visibility_to_set_visibility
Unexecuted instantiation: spl_directory.c:zend_visibility_to_set_visibility
Unexecuted instantiation: spl_dllist.c:zend_visibility_to_set_visibility
Unexecuted instantiation: spl_exceptions.c:zend_visibility_to_set_visibility
Unexecuted instantiation: spl_fixedarray.c:zend_visibility_to_set_visibility
Unexecuted instantiation: spl_functions.c:zend_visibility_to_set_visibility
Unexecuted instantiation: spl_heap.c:zend_visibility_to_set_visibility
Unexecuted instantiation: spl_iterators.c:zend_visibility_to_set_visibility
Unexecuted instantiation: spl_observer.c:zend_visibility_to_set_visibility
Unexecuted instantiation: array.c:zend_visibility_to_set_visibility
Unexecuted instantiation: assert.c:zend_visibility_to_set_visibility
Unexecuted instantiation: base64.c:zend_visibility_to_set_visibility
Unexecuted instantiation: basic_functions.c:zend_visibility_to_set_visibility
Unexecuted instantiation: browscap.c:zend_visibility_to_set_visibility
Unexecuted instantiation: crc32_x86.c:zend_visibility_to_set_visibility
Unexecuted instantiation: crc32.c:zend_visibility_to_set_visibility
Unexecuted instantiation: credits.c:zend_visibility_to_set_visibility
Unexecuted instantiation: crypt.c:zend_visibility_to_set_visibility
Unexecuted instantiation: css.c:zend_visibility_to_set_visibility
Unexecuted instantiation: datetime.c:zend_visibility_to_set_visibility
Unexecuted instantiation: dir.c:zend_visibility_to_set_visibility
Unexecuted instantiation: dl.c:zend_visibility_to_set_visibility
Unexecuted instantiation: dns.c:zend_visibility_to_set_visibility
Unexecuted instantiation: exec.c:zend_visibility_to_set_visibility
Unexecuted instantiation: file.c:zend_visibility_to_set_visibility
Unexecuted instantiation: filestat.c:zend_visibility_to_set_visibility
Unexecuted instantiation: filters.c:zend_visibility_to_set_visibility
Unexecuted instantiation: flock_compat.c:zend_visibility_to_set_visibility
Unexecuted instantiation: formatted_print.c:zend_visibility_to_set_visibility
Unexecuted instantiation: fsock.c:zend_visibility_to_set_visibility
Unexecuted instantiation: ftok.c:zend_visibility_to_set_visibility
Unexecuted instantiation: ftp_fopen_wrapper.c:zend_visibility_to_set_visibility
Unexecuted instantiation: head.c:zend_visibility_to_set_visibility
Unexecuted instantiation: hrtime.c:zend_visibility_to_set_visibility
Unexecuted instantiation: html.c:zend_visibility_to_set_visibility
Unexecuted instantiation: http_fopen_wrapper.c:zend_visibility_to_set_visibility
Unexecuted instantiation: http.c:zend_visibility_to_set_visibility
Unexecuted instantiation: image.c:zend_visibility_to_set_visibility
Unexecuted instantiation: incomplete_class.c:zend_visibility_to_set_visibility
Unexecuted instantiation: info.c:zend_visibility_to_set_visibility
Unexecuted instantiation: iptc.c:zend_visibility_to_set_visibility
Unexecuted instantiation: levenshtein.c:zend_visibility_to_set_visibility
Unexecuted instantiation: link.c:zend_visibility_to_set_visibility
Unexecuted instantiation: mail.c:zend_visibility_to_set_visibility
Unexecuted instantiation: math.c:zend_visibility_to_set_visibility
Unexecuted instantiation: md5.c:zend_visibility_to_set_visibility
Unexecuted instantiation: metaphone.c:zend_visibility_to_set_visibility
Unexecuted instantiation: microtime.c:zend_visibility_to_set_visibility
Unexecuted instantiation: net.c:zend_visibility_to_set_visibility
Unexecuted instantiation: pack.c:zend_visibility_to_set_visibility
Unexecuted instantiation: pageinfo.c:zend_visibility_to_set_visibility
Unexecuted instantiation: password.c:zend_visibility_to_set_visibility
Unexecuted instantiation: php_fopen_wrapper.c:zend_visibility_to_set_visibility
Unexecuted instantiation: proc_open.c:zend_visibility_to_set_visibility
Unexecuted instantiation: quot_print.c:zend_visibility_to_set_visibility
Unexecuted instantiation: scanf.c:zend_visibility_to_set_visibility
Unexecuted instantiation: sha1.c:zend_visibility_to_set_visibility
Unexecuted instantiation: soundex.c:zend_visibility_to_set_visibility
Unexecuted instantiation: streamsfuncs.c:zend_visibility_to_set_visibility
Unexecuted instantiation: string.c:zend_visibility_to_set_visibility
Unexecuted instantiation: strnatcmp.c:zend_visibility_to_set_visibility
Unexecuted instantiation: syslog.c:zend_visibility_to_set_visibility
Unexecuted instantiation: type.c:zend_visibility_to_set_visibility
Unexecuted instantiation: uniqid.c:zend_visibility_to_set_visibility
Unexecuted instantiation: url_scanner_ex.c:zend_visibility_to_set_visibility
Unexecuted instantiation: url.c:zend_visibility_to_set_visibility
Unexecuted instantiation: user_filters.c:zend_visibility_to_set_visibility
Unexecuted instantiation: uuencode.c:zend_visibility_to_set_visibility
Unexecuted instantiation: var_unserializer.c:zend_visibility_to_set_visibility
Unexecuted instantiation: var.c:zend_visibility_to_set_visibility
Unexecuted instantiation: versioning.c:zend_visibility_to_set_visibility
Unexecuted instantiation: crypt_sha256.c:zend_visibility_to_set_visibility
Unexecuted instantiation: crypt_sha512.c:zend_visibility_to_set_visibility
Unexecuted instantiation: php_crypt_r.c:zend_visibility_to_set_visibility
Unexecuted instantiation: php_uri.c:zend_visibility_to_set_visibility
Unexecuted instantiation: php_uri_common.c:zend_visibility_to_set_visibility
Unexecuted instantiation: uri_parser_rfc3986.c:zend_visibility_to_set_visibility
Unexecuted instantiation: uri_parser_whatwg.c:zend_visibility_to_set_visibility
Unexecuted instantiation: uri_parser_php_parse_url.c:zend_visibility_to_set_visibility
Unexecuted instantiation: explicit_bzero.c:zend_visibility_to_set_visibility
Unexecuted instantiation: fopen_wrappers.c:zend_visibility_to_set_visibility
Unexecuted instantiation: getopt.c:zend_visibility_to_set_visibility
Unexecuted instantiation: main.c:zend_visibility_to_set_visibility
Unexecuted instantiation: network.c:zend_visibility_to_set_visibility
Unexecuted instantiation: output.c:zend_visibility_to_set_visibility
Unexecuted instantiation: php_content_types.c:zend_visibility_to_set_visibility
Unexecuted instantiation: php_ini_builder.c:zend_visibility_to_set_visibility
Unexecuted instantiation: php_ini.c:zend_visibility_to_set_visibility
Unexecuted instantiation: php_glob.c:zend_visibility_to_set_visibility
Unexecuted instantiation: php_odbc_utils.c:zend_visibility_to_set_visibility
Unexecuted instantiation: php_open_temporary_file.c:zend_visibility_to_set_visibility
Unexecuted instantiation: php_scandir.c:zend_visibility_to_set_visibility
Unexecuted instantiation: php_syslog.c:zend_visibility_to_set_visibility
Unexecuted instantiation: php_ticks.c:zend_visibility_to_set_visibility
Unexecuted instantiation: php_variables.c:zend_visibility_to_set_visibility
Unexecuted instantiation: reentrancy.c:zend_visibility_to_set_visibility
Unexecuted instantiation: rfc1867.c:zend_visibility_to_set_visibility
Unexecuted instantiation: safe_bcmp.c:zend_visibility_to_set_visibility
Unexecuted instantiation: SAPI.c:zend_visibility_to_set_visibility
Unexecuted instantiation: snprintf.c:zend_visibility_to_set_visibility
Unexecuted instantiation: spprintf.c:zend_visibility_to_set_visibility
Unexecuted instantiation: strlcat.c:zend_visibility_to_set_visibility
Unexecuted instantiation: strlcpy.c:zend_visibility_to_set_visibility
Unexecuted instantiation: cast.c:zend_visibility_to_set_visibility
Unexecuted instantiation: filter.c:zend_visibility_to_set_visibility
Unexecuted instantiation: glob_wrapper.c:zend_visibility_to_set_visibility
Unexecuted instantiation: memory.c:zend_visibility_to_set_visibility
Unexecuted instantiation: mmap.c:zend_visibility_to_set_visibility
Unexecuted instantiation: plain_wrapper.c:zend_visibility_to_set_visibility
Unexecuted instantiation: streams.c:zend_visibility_to_set_visibility
Unexecuted instantiation: transports.c:zend_visibility_to_set_visibility
Unexecuted instantiation: userspace.c:zend_visibility_to_set_visibility
Unexecuted instantiation: xp_socket.c:zend_visibility_to_set_visibility
Unexecuted instantiation: block_pass.c:zend_visibility_to_set_visibility
Unexecuted instantiation: compact_literals.c:zend_visibility_to_set_visibility
Unexecuted instantiation: compact_vars.c:zend_visibility_to_set_visibility
Unexecuted instantiation: dce.c:zend_visibility_to_set_visibility
Unexecuted instantiation: dfa_pass.c:zend_visibility_to_set_visibility
Unexecuted instantiation: escape_analysis.c:zend_visibility_to_set_visibility
Unexecuted instantiation: nop_removal.c:zend_visibility_to_set_visibility
Unexecuted instantiation: optimize_func_calls.c:zend_visibility_to_set_visibility
Unexecuted instantiation: optimize_temp_vars_5.c:zend_visibility_to_set_visibility
Unexecuted instantiation: pass1.c:zend_visibility_to_set_visibility
Unexecuted instantiation: pass3.c:zend_visibility_to_set_visibility
Unexecuted instantiation: sccp.c:zend_visibility_to_set_visibility
Unexecuted instantiation: scdf.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_call_graph.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_cfg.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_dfg.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_dump.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_func_info.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_inference.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_optimizer.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_ssa.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_alloc.c:zend_visibility_to_set_visibility
zend_API.c:zend_visibility_to_set_visibility
Line
Count
Source
425
517
{
426
517
  switch (visibility) {
427
484
    case ZEND_ACC_PUBLIC:
428
484
      return ZEND_ACC_PUBLIC_SET;
429
7
    case ZEND_ACC_PROTECTED:
430
7
      return ZEND_ACC_PROTECTED_SET;
431
26
    case ZEND_ACC_PRIVATE:
432
26
      return ZEND_ACC_PRIVATE_SET;
433
0
    EMPTY_SWITCH_DEFAULT_CASE();
434
517
  }
435
517
}
Unexecuted instantiation: zend_ast.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_attributes.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_builtin_functions.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_call_stack.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_closures.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_compile.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_constants.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_default_classes.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_dtrace.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_enum.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_exceptions.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_execute_API.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_execute.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_extensions.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_fibers.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_float.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_gc.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_generators.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_hash.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_highlight.c:zend_visibility_to_set_visibility
zend_inheritance.c:zend_visibility_to_set_visibility
Line
Count
Source
425
25
{
426
25
  switch (visibility) {
427
20
    case ZEND_ACC_PUBLIC:
428
20
      return ZEND_ACC_PUBLIC_SET;
429
5
    case ZEND_ACC_PROTECTED:
430
5
      return ZEND_ACC_PROTECTED_SET;
431
0
    case ZEND_ACC_PRIVATE:
432
0
      return ZEND_ACC_PRIVATE_SET;
433
0
    EMPTY_SWITCH_DEFAULT_CASE();
434
25
  }
435
25
}
Unexecuted instantiation: zend_ini_parser.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_ini_scanner.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_ini.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_interfaces.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_iterators.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_language_parser.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_language_scanner.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_lazy_objects.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_list.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_multibyte.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_object_handlers.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_objects_API.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_objects.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_observer.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_opcode.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_operators.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_property_hooks.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_signal.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_smart_str.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_stream.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_string.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_strtod.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_system_id.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_variables.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_weakrefs.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend.c:zend_visibility_to_set_visibility
Unexecuted instantiation: internal_functions_cli.c:zend_visibility_to_set_visibility
Unexecuted instantiation: fuzzer-parser.c:zend_visibility_to_set_visibility
Unexecuted instantiation: fuzzer-sapi.c:zend_visibility_to_set_visibility
Unexecuted instantiation: fuzzer-tracing-jit.c:zend_visibility_to_set_visibility
Unexecuted instantiation: fuzzer-exif.c:zend_visibility_to_set_visibility
Unexecuted instantiation: fuzzer-unserialize.c:zend_visibility_to_set_visibility
Unexecuted instantiation: fuzzer-function-jit.c:zend_visibility_to_set_visibility
Unexecuted instantiation: fuzzer-json.c:zend_visibility_to_set_visibility
Unexecuted instantiation: fuzzer-unserializehash.c:zend_visibility_to_set_visibility
Unexecuted instantiation: fuzzer-execute.c:zend_visibility_to_set_visibility
436
437
/* call through internal function handler. e.g. Closure::invoke() */
438
410
#define ZEND_ACC_CALL_VIA_HANDLER     ZEND_ACC_CALL_VIA_TRAMPOLINE
439
440
#define ZEND_ACC_UNINSTANTIABLE (       \
441
  ZEND_ACC_INTERFACE |                \
442
  ZEND_ACC_TRAIT |                    \
443
  ZEND_ACC_IMPLICIT_ABSTRACT_CLASS |  \
444
  ZEND_ACC_EXPLICIT_ABSTRACT_CLASS |  \
445
  ZEND_ACC_ENUM                       \
446
)
447
448
77.2k
#define ZEND_SHORT_CIRCUITING_CHAIN_MASK 0x3
449
113k
#define ZEND_SHORT_CIRCUITING_CHAIN_EXPR 0
450
495
#define ZEND_SHORT_CIRCUITING_CHAIN_ISSET 1
451
63
#define ZEND_SHORT_CIRCUITING_CHAIN_EMPTY 2
452
453
// Must not clash with ZEND_SHORT_CIRCUITING_CHAIN_MASK
454
45.9k
#define ZEND_JMP_NULL_BP_VAR_IS 4
455
456
const char *zend_visibility_string(uint32_t fn_flags);
457
458
56.0k
#define ZEND_PROPERTY_HOOK_COUNT 2
459
8.91k
#define ZEND_PROPERTY_HOOK_STRUCT_SIZE (sizeof(zend_function*) * ZEND_PROPERTY_HOOK_COUNT)
460
461
/* Stored in zend_property_info.offset, not returned by zend_get_property_offset(). */
462
5.95k
#define ZEND_VIRTUAL_PROPERTY_OFFSET ((uint32_t)-1)
463
464
zend_property_hook_kind zend_get_property_hook_kind_from_name(const zend_string *name);
465
466
typedef struct _zend_property_info {
467
  uint32_t offset; /* property offset for object properties or
468
                        property index for static properties */
469
  uint32_t flags;
470
  zend_string *name;
471
  zend_string *doc_comment;
472
  HashTable *attributes;
473
  zend_class_entry *ce;
474
  zend_type type;
475
  const zend_property_info *prototype;
476
  zend_function **hooks;
477
} zend_property_info;
478
479
#define OBJ_PROP(obj, offset) \
480
12.5M
  ((zval*)((char*)(obj) + offset))
481
#define OBJ_PROP_NUM(obj, num) \
482
2.54M
  (&(obj)->properties_table[(num)])
483
#define OBJ_PROP_TO_OFFSET(num) \
484
99.1k
  ((uint32_t)(XtOffsetOf(zend_object, properties_table) + sizeof(zval) * (num)))
485
#define OBJ_PROP_TO_NUM(offset) \
486
64.3k
  (((offset) - OBJ_PROP_TO_OFFSET(0)) / sizeof(zval))
487
#define OBJ_PROP_SLOT_TO_OFFSET(obj, slot) \
488
156
  ((uintptr_t)(slot) - (uintptr_t)(obj))
489
490
typedef struct _zend_class_constant {
491
  zval value; /* flags are stored in u2 */
492
  zend_string *doc_comment;
493
  HashTable *attributes;
494
  zend_class_entry *ce;
495
  zend_type type;
496
} zend_class_constant;
497
498
46.1k
#define ZEND_CLASS_CONST_FLAGS(c) Z_CONSTANT_FLAGS((c)->value)
499
500
/* arg_info for internal functions */
501
typedef struct _zend_internal_arg_info {
502
  const char *name;
503
  zend_type type;
504
  const char *default_value;
505
} zend_internal_arg_info;
506
507
/* arg_info for user functions */
508
typedef struct _zend_arg_info {
509
  zend_string *name;
510
  zend_type type;
511
  zend_string *default_value;
512
} zend_arg_info;
513
514
/* the following structure repeats the layout of zend_internal_arg_info,
515
 * but its fields have different meaning. It's used as the first element of
516
 * arg_info array to define properties of internal functions.
517
 * It's also used for the return type.
518
 */
519
typedef struct _zend_internal_function_info {
520
  uintptr_t required_num_args;
521
  zend_type type;
522
  const char *default_value;
523
} zend_internal_function_info;
524
525
struct _zend_op_array {
526
  /* Common elements */
527
  uint8_t type;
528
  uint8_t arg_flags[3]; /* bitset of arg_info.pass_by_reference */
529
  uint32_t fn_flags;
530
  zend_string *function_name;
531
  zend_class_entry *scope;
532
  zend_function *prototype;
533
  uint32_t num_args;
534
  uint32_t required_num_args;
535
  zend_arg_info *arg_info;
536
  HashTable *attributes;
537
  ZEND_MAP_PTR_DEF(void **, run_time_cache);
538
  zend_string *doc_comment;
539
  uint32_t T;         /* number of temporary variables */
540
  uint32_t fn_flags2;
541
  const zend_property_info *prop_info; /* The corresponding prop_info if this is a hook. */
542
  /* END of common elements */
543
544
  uint32_t cache_size; /* number of run_time_cache_slots * sizeof(void*) */
545
  int last_var;        /* number of CV variables */
546
  uint32_t last;       /* number of opcodes */
547
548
  zend_op *opcodes;
549
  ZEND_MAP_PTR_DEF(HashTable *, static_variables_ptr);
550
  HashTable *static_variables;
551
  zend_string **vars; /* names of CV variables */
552
553
  uint32_t *refcount;
554
555
  uint32_t last_live_range;
556
  uint32_t last_try_catch;
557
  zend_live_range *live_range;
558
  zend_try_catch_element *try_catch_array;
559
560
  zend_string *filename;
561
  uint32_t line_start;
562
  uint32_t line_end;
563
564
  uint32_t last_literal;
565
  uint32_t num_dynamic_func_defs;
566
  zval *literals;
567
568
  /* Functions that are declared dynamically are stored here and
569
   * referenced by index from opcodes. */
570
  zend_op_array **dynamic_func_defs;
571
572
  void *reserved[ZEND_MAX_RESERVED_RESOURCES];
573
};
574
575
576
#define ZEND_RETURN_VALUE       0
577
#define ZEND_RETURN_REFERENCE     1
578
579
#define INTERNAL_FUNCTION_PARAMETERS zend_execute_data *execute_data, zval *return_value
580
16.8k
#define INTERNAL_FUNCTION_PARAM_PASSTHRU execute_data, return_value
581
582
/* zend_internal_function_handler */
583
typedef void (ZEND_FASTCALL *zif_handler)(INTERNAL_FUNCTION_PARAMETERS);
584
585
typedef struct _zend_internal_function {
586
  /* Common elements */
587
  uint8_t type;
588
  uint8_t arg_flags[3]; /* bitset of arg_info.pass_by_reference */
589
  uint32_t fn_flags;
590
  zend_string* function_name;
591
  zend_class_entry *scope;
592
  zend_function *prototype;
593
  uint32_t num_args;
594
  uint32_t required_num_args;
595
  zend_internal_arg_info *arg_info;
596
  HashTable *attributes;
597
  ZEND_MAP_PTR_DEF(void **, run_time_cache);
598
  zend_string *doc_comment;
599
  uint32_t T;         /* number of temporary variables */
600
  uint32_t fn_flags2;
601
  const zend_property_info *prop_info; /* The corresponding prop_info if this is a hook. */
602
  /* END of common elements */
603
604
  zif_handler handler;
605
  struct _zend_module_entry *module;
606
  const zend_frameless_function_info *frameless_function_infos;
607
  void *reserved[ZEND_MAX_RESERVED_RESOURCES];
608
} zend_internal_function;
609
610
445
#define ZEND_FN_SCOPE_NAME(function)  ((function) && (function)->common.scope ? ZSTR_VAL((function)->common.scope->name) : "")
611
612
union _zend_function {
613
  uint8_t type; /* MUST be the first element of this struct! */
614
  uint32_t   quick_arg_flags;
615
616
  struct {
617
    uint8_t type;  /* never used */
618
    uint8_t arg_flags[3]; /* bitset of arg_info.pass_by_reference */
619
    uint32_t fn_flags;
620
    zend_string *function_name;
621
    zend_class_entry *scope;
622
    zend_function *prototype;
623
    uint32_t num_args;
624
    uint32_t required_num_args;
625
    zend_arg_info *arg_info;  /* index -1 represents the return value info, if any */
626
    HashTable   *attributes;
627
    ZEND_MAP_PTR_DEF(void **, run_time_cache);
628
    zend_string *doc_comment;
629
    uint32_t T;         /* number of temporary variables */
630
    uint32_t fn_flags2;
631
    const zend_property_info *prop_info; /* The corresponding prop_info if this is a hook. */
632
  } common;
633
634
  zend_op_array op_array;
635
  zend_internal_function internal_function;
636
};
637
638
struct _zend_execute_data {
639
  const zend_op       *opline;           /* executed opline                */
640
  zend_execute_data   *call;             /* current call                   */
641
  zval                *return_value;
642
  zend_function       *func;             /* executed function              */
643
  zval                 This;             /* this + call_info + num_args    */
644
  zend_execute_data   *prev_execute_data;
645
  zend_array          *symbol_table;
646
  void               **run_time_cache;   /* cache op_array->run_time_cache */
647
  zend_array          *extra_named_params;
648
};
649
650
1.10M
#define ZEND_CALL_HAS_THIS           IS_OBJECT_EX
651
652
/* Top 16 bits of Z_TYPE_INFO(EX(This)) are used as call_info flags */
653
1.52M
#define ZEND_CALL_FUNCTION           (0 << 16)
654
165k
#define ZEND_CALL_CODE               (1 << 16)
655
662k
#define ZEND_CALL_NESTED             (0 << 17)
656
661k
#define ZEND_CALL_TOP                (1 << 17)
657
355
#define ZEND_CALL_ALLOCATED          (1 << 18)
658
4.10k
#define ZEND_CALL_FREE_EXTRA_ARGS    (1 << 19)
659
291k
#define ZEND_CALL_HAS_SYMBOL_TABLE   (1 << 20)
660
492k
#define ZEND_CALL_RELEASE_THIS       (1 << 21)
661
19.7k
#define ZEND_CALL_CLOSURE            (1 << 22)
662
90
#define ZEND_CALL_FAKE_CLOSURE       (1 << 23) /* Same as ZEND_ACC_FAKE_CLOSURE */
663
5.85k
#define ZEND_CALL_GENERATOR          (1 << 24)
664
565k
#define ZEND_CALL_DYNAMIC            (1 << 25)
665
#define ZEND_CALL_MAY_HAVE_UNDEF     (1 << 26)
666
626k
#define ZEND_CALL_HAS_EXTRA_NAMED_PARAMS (1 << 27)
667
#define ZEND_CALL_OBSERVED           (1 << 28) /* "fcall_begin" observer handler may set this flag */
668
                                               /* to prevent optimization in RETURN handler and    */
669
                                               /* keep all local variables for "fcall_end" handler */
670
0
#define ZEND_CALL_JIT_RESERVED       (1 << 29) /* reserved for tracing JIT */
671
129k
#define ZEND_CALL_NEEDS_REATTACH     (1 << 30)
672
#define ZEND_CALL_SEND_ARG_BY_REF    (1u << 31)
673
674
592k
#define ZEND_CALL_NESTED_FUNCTION    (ZEND_CALL_FUNCTION | ZEND_CALL_NESTED)
675
65.3k
#define ZEND_CALL_NESTED_CODE        (ZEND_CALL_CODE | ZEND_CALL_NESTED)
676
556k
#define ZEND_CALL_TOP_FUNCTION       (ZEND_CALL_TOP | ZEND_CALL_FUNCTION)
677
99.3k
#define ZEND_CALL_TOP_CODE           (ZEND_CALL_CODE | ZEND_CALL_TOP)
678
679
#define ZEND_CALL_INFO(call) \
680
4.01M
  Z_TYPE_INFO((call)->This)
681
682
#define ZEND_CALL_KIND_EX(call_info) \
683
  (call_info & (ZEND_CALL_CODE | ZEND_CALL_TOP))
684
685
#define ZEND_CALL_KIND(call) \
686
  ZEND_CALL_KIND_EX(ZEND_CALL_INFO(call))
687
688
129k
#define ZEND_ADD_CALL_FLAG_EX(call_info, flag) do { \
689
129k
    call_info |= (flag); \
690
129k
  } while (0)
691
692
415
#define ZEND_DEL_CALL_FLAG_EX(call_info, flag) do { \
693
415
    call_info &= ~(flag); \
694
415
  } while (0)
695
696
124k
#define ZEND_ADD_CALL_FLAG(call, flag) do { \
697
124k
    ZEND_ADD_CALL_FLAG_EX(Z_TYPE_INFO((call)->This), flag); \
698
124k
  } while (0)
699
700
415
#define ZEND_DEL_CALL_FLAG(call, flag) do { \
701
415
    ZEND_DEL_CALL_FLAG_EX(Z_TYPE_INFO((call)->This), flag); \
702
415
  } while (0)
703
704
#define ZEND_CALL_NUM_ARGS(call) \
705
12.1M
  (call)->This.u2.num_args
706
707
/* Ensure the correct alignment before slots calculation */
708
ZEND_STATIC_ASSERT(ZEND_MM_ALIGNED_SIZE(sizeof(zval)) == sizeof(zval),
709
                   "zval must be aligned by ZEND_MM_ALIGNMENT");
710
/* A number of call frame slots (zvals) reserved for zend_execute_data. */
711
#define ZEND_CALL_FRAME_SLOT \
712
182M
  ((int)((sizeof(zend_execute_data) + sizeof(zval) - 1) / sizeof(zval)))
713
714
#define ZEND_CALL_VAR(call, n) \
715
16.3M
  ((zval*)(((char*)(call)) + ((int)(n))))
716
717
#define ZEND_CALL_VAR_NUM(call, n) \
718
6.55M
  (((zval*)(call)) + (ZEND_CALL_FRAME_SLOT + ((int)(n))))
719
720
#define ZEND_CALL_ARG(call, n) \
721
5.02M
  ZEND_CALL_VAR_NUM(call, ((int)(n)) - 1)
722
723
29.8M
#define EX(element)       ((execute_data)->element)
724
725
382k
#define EX_CALL_INFO()      ZEND_CALL_INFO(execute_data)
726
#define EX_CALL_KIND()      ZEND_CALL_KIND(execute_data)
727
1.29M
#define EX_NUM_ARGS()     ZEND_CALL_NUM_ARGS(execute_data)
728
729
#define ZEND_CALL_USES_STRICT_TYPES(call) \
730
3.46M
  (((call)->func->common.fn_flags & ZEND_ACC_STRICT_TYPES) != 0)
731
732
#define EX_USES_STRICT_TYPES() \
733
1.74M
  ZEND_CALL_USES_STRICT_TYPES(execute_data)
734
735
#define ZEND_ARG_USES_STRICT_TYPES() \
736
22.0k
  (EG(current_execute_data)->prev_execute_data && \
737
10.9k
   EG(current_execute_data)->prev_execute_data->func && \
738
22.0k
   ZEND_CALL_USES_STRICT_TYPES(EG(current_execute_data)->prev_execute_data))
739
740
#define ZEND_FLF_ARG_USES_STRICT_TYPES() \
741
  (EG(current_execute_data) && \
742
   EG(current_execute_data)->func && \
743
   ZEND_CALL_USES_STRICT_TYPES(EG(current_execute_data)))
744
745
#define ZEND_RET_USES_STRICT_TYPES() \
746
369
  ZEND_CALL_USES_STRICT_TYPES(EG(current_execute_data))
747
748
15.3M
#define EX_VAR(n)       ZEND_CALL_VAR(execute_data, n)
749
372k
#define EX_VAR_NUM(n)     ZEND_CALL_VAR_NUM(execute_data, n)
750
751
92.1M
#define EX_VAR_TO_NUM(n)    ((uint32_t)((n) / sizeof(zval) - ZEND_CALL_FRAME_SLOT))
752
82.7M
#define EX_NUM_TO_VAR(n)    ((uint32_t)(((n) + ZEND_CALL_FRAME_SLOT) * sizeof(zval)))
753
754
#define ZEND_OPLINE_TO_OFFSET(opline, target) \
755
226k
  ((char*)(target) - (char*)(opline))
756
757
#define ZEND_OPLINE_NUM_TO_OFFSET(op_array, opline, opline_num) \
758
2.88M
  ((char*)&(op_array)->opcodes[opline_num] - (char*)(opline))
759
760
#define ZEND_OFFSET_TO_OPLINE(base, offset) \
761
462k
  ((zend_op*)(((char*)(base)) + (int)offset))
762
763
#define ZEND_OFFSET_TO_OPLINE_NUM(op_array, base, offset) \
764
19.0k
  (ZEND_OFFSET_TO_OPLINE(base, offset) - op_array->opcodes)
765
766
#if ZEND_USE_ABS_JMP_ADDR
767
768
/* run-time jump target */
769
# define OP_JMP_ADDR(opline, node) \
770
  (node).jmp_addr
771
772
# define ZEND_SET_OP_JMP_ADDR(opline, node, val) do { \
773
    (node).jmp_addr = (val); \
774
  } while (0)
775
776
/* convert jump target from compile-time to run-time */
777
# define ZEND_PASS_TWO_UPDATE_JMP_TARGET(op_array, opline, node) do { \
778
    (node).jmp_addr = (op_array)->opcodes + (node).opline_num; \
779
  } while (0)
780
781
/* convert jump target back from run-time to compile-time */
782
# define ZEND_PASS_TWO_UNDO_JMP_TARGET(op_array, opline, node) do { \
783
    (node).opline_num = (node).jmp_addr - (op_array)->opcodes; \
784
  } while (0)
785
786
#else
787
788
/* run-time jump target */
789
# define OP_JMP_ADDR(opline, node) \
790
443k
  ZEND_OFFSET_TO_OPLINE(opline, (node).jmp_offset)
791
792
211k
# define ZEND_SET_OP_JMP_ADDR(opline, node, val) do { \
793
211k
    (node).jmp_offset = ZEND_OPLINE_TO_OFFSET(opline, val); \
794
211k
  } while (0)
795
796
/* convert jump target from compile-time to run-time */
797
2.86M
# define ZEND_PASS_TWO_UPDATE_JMP_TARGET(op_array, opline, node) do { \
798
2.86M
    (node).jmp_offset = ZEND_OPLINE_NUM_TO_OFFSET(op_array, opline, (node).opline_num); \
799
2.86M
  } while (0)
800
801
/* convert jump target back from run-time to compile-time */
802
# define ZEND_PASS_TWO_UNDO_JMP_TARGET(op_array, opline, node) do { \
803
    (node).opline_num = ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, (node).jmp_offset); \
804
  } while (0)
805
806
#endif
807
808
/* constant-time constant */
809
# define CT_CONSTANT_EX(op_array, num) \
810
52.8M
  ((op_array)->literals + (num))
811
812
# define CT_CONSTANT(node) \
813
5.62k
  CT_CONSTANT_EX(CG(active_op_array), (node).constant)
814
815
#if ZEND_USE_ABS_CONST_ADDR
816
817
/* run-time constant */
818
# define RT_CONSTANT(opline, node) \
819
  (node).zv
820
821
/* convert constant from compile-time to run-time */
822
# define ZEND_PASS_TWO_UPDATE_CONSTANT(op_array, opline, node) do { \
823
    (node).zv = CT_CONSTANT_EX(op_array, (node).constant); \
824
  } while (0)
825
826
#else
827
828
/* At run-time, constants are allocated together with op_array->opcodes
829
 * and addressed relatively to current opline.
830
 */
831
832
/* run-time constant */
833
# define RT_CONSTANT(opline, node) \
834
4.52M
  ((zval*)(((char*)(opline)) + (int32_t)(node).constant))
835
836
/* convert constant from compile-time to run-time */
837
15.8M
# define ZEND_PASS_TWO_UPDATE_CONSTANT(op_array, opline, node) do { \
838
15.8M
    (node).constant = \
839
15.8M
      (((char*)CT_CONSTANT_EX(op_array, (node).constant)) - \
840
15.8M
      ((char*)opline)); \
841
15.8M
  } while (0)
842
843
#endif
844
845
/* convert constant back from run-time to compile-time */
846
1.04M
#define ZEND_PASS_TWO_UNDO_CONSTANT(op_array, opline, node) do { \
847
1.04M
    (node).constant = RT_CONSTANT(opline, node) - (op_array)->literals; \
848
1.04M
  } while (0)
849
850
#define RUN_TIME_CACHE(op_array) \
851
409k
  ZEND_MAP_PTR_GET((op_array)->run_time_cache)
852
853
#define ZEND_OP_ARRAY_EXTENSION(op_array, handle) \
854
0
  ((void**)RUN_TIME_CACHE(op_array))[handle]
855
856
191M
#define IS_UNUSED 0    /* Unused operand */
857
269M
#define IS_CONST  (1<<0)
858
496M
#define IS_TMP_VAR  (1<<1)
859
463M
#define IS_VAR    (1<<2)
860
63.8M
#define IS_CV   (1<<3)  /* Compiled variable */
861
862
/* Used for result.type of smart branch instructions */
863
1.54M
#define IS_SMART_BRANCH_JMPZ  (1<<4)
864
1.55M
#define IS_SMART_BRANCH_JMPNZ (1<<5)
865
866
27.5k
#define ZEND_EXTRA_VALUE 1
867
868
#include "zend_globals.h"
869
870
typedef enum _zend_compile_position {
871
  ZEND_COMPILE_POSITION_AT_SHEBANG = 0,
872
  ZEND_COMPILE_POSITION_AT_OPEN_TAG,
873
  ZEND_COMPILE_POSITION_AFTER_OPEN_TAG
874
} zend_compile_position;
875
876
BEGIN_EXTERN_C()
877
878
void init_compiler(void);
879
void shutdown_compiler(void);
880
void zend_init_compiler_data_structures(void);
881
882
void zend_oparray_context_begin(zend_oparray_context *prev_context, zend_op_array *op_array);
883
void zend_oparray_context_end(const zend_oparray_context *prev_context);
884
void zend_file_context_begin(zend_file_context *prev_context);
885
void zend_file_context_end(const zend_file_context *prev_context);
886
887
extern ZEND_API zend_op_array *(*zend_compile_file)(zend_file_handle *file_handle, int type);
888
extern ZEND_API zend_op_array *(*zend_compile_string)(zend_string *source_string, const char *filename, zend_compile_position position);
889
890
ZEND_API int ZEND_FASTCALL lex_scan(zval *zendlval, zend_parser_stack_elem *elem);
891
void startup_scanner(void);
892
void shutdown_scanner(void);
893
894
ZEND_API zend_string *zend_set_compiled_filename(zend_string *new_compiled_filename);
895
ZEND_API void zend_restore_compiled_filename(zend_string *original_compiled_filename);
896
ZEND_API zend_string *zend_get_compiled_filename(void);
897
ZEND_API uint32_t zend_get_compiled_lineno(void);
898
ZEND_API size_t zend_get_scanned_file_offset(void);
899
900
ZEND_API zend_string *zend_get_compiled_variable_name(const zend_op_array *op_array, uint32_t var);
901
902
#ifdef ZTS
903
const char *zend_get_zendtext(void);
904
#endif
905
906
typedef zend_result (ZEND_FASTCALL *unary_op_type)(zval *, zval *);
907
typedef zend_result (ZEND_FASTCALL *binary_op_type)(zval *, zval *, zval *);
908
909
ZEND_API unary_op_type get_unary_op(int opcode);
910
ZEND_API binary_op_type get_binary_op(int opcode);
911
912
void zend_stop_lexing(void);
913
void zend_emit_final_return(bool return_one);
914
915
typedef enum {
916
  ZEND_MODIFIER_TARGET_PROPERTY = 0,
917
  ZEND_MODIFIER_TARGET_METHOD,
918
  ZEND_MODIFIER_TARGET_CONSTANT,
919
  ZEND_MODIFIER_TARGET_CPP,
920
  ZEND_MODIFIER_TARGET_PROPERTY_HOOK,
921
} zend_modifier_target;
922
923
/* Used during AST construction */
924
zend_ast *zend_ast_append_str(zend_ast *left, zend_ast *right);
925
zend_ast *zend_negate_num_string(zend_ast *ast);
926
uint32_t zend_add_class_modifier(uint32_t flags, uint32_t new_flag);
927
uint32_t zend_add_anonymous_class_modifier(uint32_t flags, uint32_t new_flag);
928
uint32_t zend_add_member_modifier(uint32_t flags, uint32_t new_flag, zend_modifier_target target);
929
930
uint32_t zend_modifier_token_to_flag(zend_modifier_target target, uint32_t flags);
931
uint32_t zend_modifier_list_to_flags(zend_modifier_target target, zend_ast *modifiers);
932
933
bool zend_handle_encoding_declaration(zend_ast *ast);
934
935
ZEND_API zend_class_entry *zend_bind_class_in_slot(
936
    zval *class_table_slot, const zval *lcname, zend_string *lc_parent_name);
937
ZEND_API zend_result do_bind_function(zend_function *func, const zval *lcname);
938
ZEND_API zend_result do_bind_class(zval *lcname, zend_string *lc_parent_name);
939
940
void zend_resolve_goto_label(zend_op_array *op_array, zend_op *opline);
941
942
ZEND_API void function_add_ref(zend_function *function);
943
zend_string *zval_make_interned_string(zval *zv);
944
945
2.31M
#define INITIAL_OP_ARRAY_SIZE 64
946
947
948
/* helper functions in zend_language_scanner.l */
949
struct _zend_arena;
950
951
ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type);
952
ZEND_API zend_op_array *compile_string(zend_string *source_string, const char *filename, zend_compile_position position);
953
ZEND_API zend_op_array *compile_filename(int type, zend_string *filename);
954
ZEND_API zend_ast *zend_compile_string_to_ast(
955
    zend_string *code, struct _zend_arena **ast_arena, zend_string *filename);
956
ZEND_API zend_result zend_execute_scripts(int type, zval *retval, int file_count, ...);
957
ZEND_API zend_result zend_execute_script(int type, zval *retval, zend_file_handle *file_handle);
958
ZEND_API zend_result open_file_for_scanning(zend_file_handle *file_handle);
959
ZEND_API void init_op_array(zend_op_array *op_array, uint8_t type, int initial_ops_size);
960
ZEND_API void destroy_op_array(zend_op_array *op_array);
961
ZEND_API void zend_destroy_static_vars(zend_op_array *op_array);
962
ZEND_API void zend_destroy_file_handle(zend_file_handle *file_handle);
963
ZEND_API void zend_cleanup_mutable_class_data(zend_class_entry *ce);
964
ZEND_API void zend_cleanup_internal_class_data(zend_class_entry *ce);
965
ZEND_API void zend_type_release(zend_type type, bool persistent);
966
ZEND_API zend_string *zend_create_member_string(const zend_string *class_name, const zend_string *member_name);
967
968
969
ZEND_API ZEND_COLD void zend_user_exception_handler(void);
970
971
#define zend_try_exception_handler() do { \
972
    if (UNEXPECTED(EG(exception))) { \
973
      if (Z_TYPE(EG(user_exception_handler)) != IS_UNDEF) { \
974
        zend_user_exception_handler(); \
975
      } \
976
    } \
977
  } while (0)
978
979
void zend_free_internal_arg_info(zend_internal_function *function);
980
ZEND_API void destroy_zend_function(zend_function *function);
981
ZEND_API void zend_function_dtor(zval *zv);
982
ZEND_API void destroy_zend_class(zval *zv);
983
void zend_class_add_ref(zval *zv);
984
985
ZEND_API zend_string *zend_mangle_property_name(const char *src1, size_t src1_length, const char *src2, size_t src2_length, bool internal);
986
#define zend_unmangle_property_name(mangled_property, class_name, prop_name) \
987
366k
        zend_unmangle_property_name_ex(mangled_property, class_name, prop_name, NULL)
988
ZEND_API zend_result zend_unmangle_property_name_ex(const zend_string *name, const char **class_name, const char **prop_name, size_t *prop_len);
989
990
354k
static zend_always_inline const char *zend_get_unmangled_property_name(const zend_string *mangled_prop) {
991
354k
  const char *class_name, *prop_name;
992
354k
  zend_unmangle_property_name(mangled_prop, &class_name, &prop_name);
993
354k
  return prop_name;
994
354k
}
Unexecuted instantiation: php_date.c:zend_get_unmangled_property_name
Unexecuted instantiation: php_pcre.c:zend_get_unmangled_property_name
Unexecuted instantiation: exif.c:zend_get_unmangled_property_name
Unexecuted instantiation: hash_adler32.c:zend_get_unmangled_property_name
Unexecuted instantiation: hash_crc32.c:zend_get_unmangled_property_name
Unexecuted instantiation: hash_fnv.c:zend_get_unmangled_property_name
Unexecuted instantiation: hash_gost.c:zend_get_unmangled_property_name
Unexecuted instantiation: hash_haval.c:zend_get_unmangled_property_name
Unexecuted instantiation: hash_joaat.c:zend_get_unmangled_property_name
Unexecuted instantiation: hash_md.c:zend_get_unmangled_property_name
Unexecuted instantiation: hash_murmur.c:zend_get_unmangled_property_name
Unexecuted instantiation: hash_ripemd.c:zend_get_unmangled_property_name
Unexecuted instantiation: hash_sha_ni.c:zend_get_unmangled_property_name
Unexecuted instantiation: hash_sha_sse2.c:zend_get_unmangled_property_name
Unexecuted instantiation: hash_sha.c:zend_get_unmangled_property_name
Unexecuted instantiation: hash_sha3.c:zend_get_unmangled_property_name
Unexecuted instantiation: hash_snefru.c:zend_get_unmangled_property_name
Unexecuted instantiation: hash_tiger.c:zend_get_unmangled_property_name
Unexecuted instantiation: hash_whirlpool.c:zend_get_unmangled_property_name
Unexecuted instantiation: hash_xxhash.c:zend_get_unmangled_property_name
Unexecuted instantiation: hash.c:zend_get_unmangled_property_name
Unexecuted instantiation: json_encoder.c:zend_get_unmangled_property_name
Unexecuted instantiation: json_parser.tab.c:zend_get_unmangled_property_name
Unexecuted instantiation: json_scanner.c:zend_get_unmangled_property_name
Unexecuted instantiation: json.c:zend_get_unmangled_property_name
Unexecuted instantiation: php_lexbor.c:zend_get_unmangled_property_name
Unexecuted instantiation: shared_alloc_mmap.c:zend_get_unmangled_property_name
Unexecuted instantiation: shared_alloc_posix.c:zend_get_unmangled_property_name
Unexecuted instantiation: shared_alloc_shm.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_accelerator_api.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_accelerator_blacklist.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_accelerator_debug.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_accelerator_hash.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_accelerator_module.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_accelerator_util_funcs.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_file_cache.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_persist_calc.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_persist.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_shared_alloc.c:zend_get_unmangled_property_name
Unexecuted instantiation: ZendAccelerator.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_jit_vm_helpers.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_jit.c:zend_get_unmangled_property_name
Unexecuted instantiation: csprng.c:zend_get_unmangled_property_name
Unexecuted instantiation: engine_mt19937.c:zend_get_unmangled_property_name
Unexecuted instantiation: engine_pcgoneseq128xslrr64.c:zend_get_unmangled_property_name
Unexecuted instantiation: engine_secure.c:zend_get_unmangled_property_name
Unexecuted instantiation: engine_user.c:zend_get_unmangled_property_name
Unexecuted instantiation: engine_xoshiro256starstar.c:zend_get_unmangled_property_name
Unexecuted instantiation: gammasection.c:zend_get_unmangled_property_name
Unexecuted instantiation: random.c:zend_get_unmangled_property_name
Unexecuted instantiation: randomizer.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_utils.c:zend_get_unmangled_property_name
Unexecuted instantiation: php_reflection.c:zend_get_unmangled_property_name
Unexecuted instantiation: php_spl.c:zend_get_unmangled_property_name
Unexecuted instantiation: spl_array.c:zend_get_unmangled_property_name
Unexecuted instantiation: spl_directory.c:zend_get_unmangled_property_name
Unexecuted instantiation: spl_dllist.c:zend_get_unmangled_property_name
Unexecuted instantiation: spl_exceptions.c:zend_get_unmangled_property_name
Unexecuted instantiation: spl_fixedarray.c:zend_get_unmangled_property_name
Unexecuted instantiation: spl_functions.c:zend_get_unmangled_property_name
Unexecuted instantiation: spl_heap.c:zend_get_unmangled_property_name
Unexecuted instantiation: spl_iterators.c:zend_get_unmangled_property_name
Unexecuted instantiation: spl_observer.c:zend_get_unmangled_property_name
Unexecuted instantiation: array.c:zend_get_unmangled_property_name
Unexecuted instantiation: assert.c:zend_get_unmangled_property_name
Unexecuted instantiation: base64.c:zend_get_unmangled_property_name
Unexecuted instantiation: basic_functions.c:zend_get_unmangled_property_name
Unexecuted instantiation: browscap.c:zend_get_unmangled_property_name
Unexecuted instantiation: crc32_x86.c:zend_get_unmangled_property_name
Unexecuted instantiation: crc32.c:zend_get_unmangled_property_name
Unexecuted instantiation: credits.c:zend_get_unmangled_property_name
Unexecuted instantiation: crypt.c:zend_get_unmangled_property_name
Unexecuted instantiation: css.c:zend_get_unmangled_property_name
Unexecuted instantiation: datetime.c:zend_get_unmangled_property_name
Unexecuted instantiation: dir.c:zend_get_unmangled_property_name
Unexecuted instantiation: dl.c:zend_get_unmangled_property_name
Unexecuted instantiation: dns.c:zend_get_unmangled_property_name
Unexecuted instantiation: exec.c:zend_get_unmangled_property_name
Unexecuted instantiation: file.c:zend_get_unmangled_property_name
Unexecuted instantiation: filestat.c:zend_get_unmangled_property_name
Unexecuted instantiation: filters.c:zend_get_unmangled_property_name
Unexecuted instantiation: flock_compat.c:zend_get_unmangled_property_name
Unexecuted instantiation: formatted_print.c:zend_get_unmangled_property_name
Unexecuted instantiation: fsock.c:zend_get_unmangled_property_name
Unexecuted instantiation: ftok.c:zend_get_unmangled_property_name
Unexecuted instantiation: ftp_fopen_wrapper.c:zend_get_unmangled_property_name
Unexecuted instantiation: head.c:zend_get_unmangled_property_name
Unexecuted instantiation: hrtime.c:zend_get_unmangled_property_name
Unexecuted instantiation: html.c:zend_get_unmangled_property_name
Unexecuted instantiation: http_fopen_wrapper.c:zend_get_unmangled_property_name
Unexecuted instantiation: http.c:zend_get_unmangled_property_name
Unexecuted instantiation: image.c:zend_get_unmangled_property_name
Unexecuted instantiation: incomplete_class.c:zend_get_unmangled_property_name
Unexecuted instantiation: info.c:zend_get_unmangled_property_name
Unexecuted instantiation: iptc.c:zend_get_unmangled_property_name
Unexecuted instantiation: levenshtein.c:zend_get_unmangled_property_name
Unexecuted instantiation: link.c:zend_get_unmangled_property_name
Unexecuted instantiation: mail.c:zend_get_unmangled_property_name
Unexecuted instantiation: math.c:zend_get_unmangled_property_name
Unexecuted instantiation: md5.c:zend_get_unmangled_property_name
Unexecuted instantiation: metaphone.c:zend_get_unmangled_property_name
Unexecuted instantiation: microtime.c:zend_get_unmangled_property_name
Unexecuted instantiation: net.c:zend_get_unmangled_property_name
Unexecuted instantiation: pack.c:zend_get_unmangled_property_name
Unexecuted instantiation: pageinfo.c:zend_get_unmangled_property_name
Unexecuted instantiation: password.c:zend_get_unmangled_property_name
Unexecuted instantiation: php_fopen_wrapper.c:zend_get_unmangled_property_name
Unexecuted instantiation: proc_open.c:zend_get_unmangled_property_name
Unexecuted instantiation: quot_print.c:zend_get_unmangled_property_name
Unexecuted instantiation: scanf.c:zend_get_unmangled_property_name
Unexecuted instantiation: sha1.c:zend_get_unmangled_property_name
Unexecuted instantiation: soundex.c:zend_get_unmangled_property_name
Unexecuted instantiation: streamsfuncs.c:zend_get_unmangled_property_name
Unexecuted instantiation: string.c:zend_get_unmangled_property_name
Unexecuted instantiation: strnatcmp.c:zend_get_unmangled_property_name
Unexecuted instantiation: syslog.c:zend_get_unmangled_property_name
Unexecuted instantiation: type.c:zend_get_unmangled_property_name
Unexecuted instantiation: uniqid.c:zend_get_unmangled_property_name
Unexecuted instantiation: url_scanner_ex.c:zend_get_unmangled_property_name
Unexecuted instantiation: url.c:zend_get_unmangled_property_name
Unexecuted instantiation: user_filters.c:zend_get_unmangled_property_name
Unexecuted instantiation: uuencode.c:zend_get_unmangled_property_name
var_unserializer.c:zend_get_unmangled_property_name
Line
Count
Source
990
344k
static zend_always_inline const char *zend_get_unmangled_property_name(const zend_string *mangled_prop) {
991
344k
  const char *class_name, *prop_name;
992
  zend_unmangle_property_name(mangled_prop, &class_name, &prop_name);
993
344k
  return prop_name;
994
344k
}
var.c:zend_get_unmangled_property_name
Line
Count
Source
990
363
static zend_always_inline const char *zend_get_unmangled_property_name(const zend_string *mangled_prop) {
991
363
  const char *class_name, *prop_name;
992
  zend_unmangle_property_name(mangled_prop, &class_name, &prop_name);
993
363
  return prop_name;
994
363
}
Unexecuted instantiation: versioning.c:zend_get_unmangled_property_name
Unexecuted instantiation: crypt_sha256.c:zend_get_unmangled_property_name
Unexecuted instantiation: crypt_sha512.c:zend_get_unmangled_property_name
Unexecuted instantiation: php_crypt_r.c:zend_get_unmangled_property_name
Unexecuted instantiation: php_uri.c:zend_get_unmangled_property_name
Unexecuted instantiation: php_uri_common.c:zend_get_unmangled_property_name
Unexecuted instantiation: uri_parser_rfc3986.c:zend_get_unmangled_property_name
Unexecuted instantiation: uri_parser_whatwg.c:zend_get_unmangled_property_name
Unexecuted instantiation: uri_parser_php_parse_url.c:zend_get_unmangled_property_name
Unexecuted instantiation: explicit_bzero.c:zend_get_unmangled_property_name
Unexecuted instantiation: fopen_wrappers.c:zend_get_unmangled_property_name
Unexecuted instantiation: getopt.c:zend_get_unmangled_property_name
Unexecuted instantiation: main.c:zend_get_unmangled_property_name
Unexecuted instantiation: network.c:zend_get_unmangled_property_name
Unexecuted instantiation: output.c:zend_get_unmangled_property_name
Unexecuted instantiation: php_content_types.c:zend_get_unmangled_property_name
Unexecuted instantiation: php_ini_builder.c:zend_get_unmangled_property_name
Unexecuted instantiation: php_ini.c:zend_get_unmangled_property_name
Unexecuted instantiation: php_glob.c:zend_get_unmangled_property_name
Unexecuted instantiation: php_odbc_utils.c:zend_get_unmangled_property_name
Unexecuted instantiation: php_open_temporary_file.c:zend_get_unmangled_property_name
Unexecuted instantiation: php_scandir.c:zend_get_unmangled_property_name
Unexecuted instantiation: php_syslog.c:zend_get_unmangled_property_name
Unexecuted instantiation: php_ticks.c:zend_get_unmangled_property_name
Unexecuted instantiation: php_variables.c:zend_get_unmangled_property_name
Unexecuted instantiation: reentrancy.c:zend_get_unmangled_property_name
Unexecuted instantiation: rfc1867.c:zend_get_unmangled_property_name
Unexecuted instantiation: safe_bcmp.c:zend_get_unmangled_property_name
Unexecuted instantiation: SAPI.c:zend_get_unmangled_property_name
Unexecuted instantiation: snprintf.c:zend_get_unmangled_property_name
Unexecuted instantiation: spprintf.c:zend_get_unmangled_property_name
Unexecuted instantiation: strlcat.c:zend_get_unmangled_property_name
Unexecuted instantiation: strlcpy.c:zend_get_unmangled_property_name
Unexecuted instantiation: cast.c:zend_get_unmangled_property_name
Unexecuted instantiation: filter.c:zend_get_unmangled_property_name
Unexecuted instantiation: glob_wrapper.c:zend_get_unmangled_property_name
Unexecuted instantiation: memory.c:zend_get_unmangled_property_name
Unexecuted instantiation: mmap.c:zend_get_unmangled_property_name
Unexecuted instantiation: plain_wrapper.c:zend_get_unmangled_property_name
Unexecuted instantiation: streams.c:zend_get_unmangled_property_name
Unexecuted instantiation: transports.c:zend_get_unmangled_property_name
Unexecuted instantiation: userspace.c:zend_get_unmangled_property_name
Unexecuted instantiation: xp_socket.c:zend_get_unmangled_property_name
Unexecuted instantiation: block_pass.c:zend_get_unmangled_property_name
Unexecuted instantiation: compact_literals.c:zend_get_unmangled_property_name
Unexecuted instantiation: compact_vars.c:zend_get_unmangled_property_name
Unexecuted instantiation: dce.c:zend_get_unmangled_property_name
Unexecuted instantiation: dfa_pass.c:zend_get_unmangled_property_name
Unexecuted instantiation: escape_analysis.c:zend_get_unmangled_property_name
Unexecuted instantiation: nop_removal.c:zend_get_unmangled_property_name
Unexecuted instantiation: optimize_func_calls.c:zend_get_unmangled_property_name
Unexecuted instantiation: optimize_temp_vars_5.c:zend_get_unmangled_property_name
Unexecuted instantiation: pass1.c:zend_get_unmangled_property_name
Unexecuted instantiation: pass3.c:zend_get_unmangled_property_name
Unexecuted instantiation: sccp.c:zend_get_unmangled_property_name
Unexecuted instantiation: scdf.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_call_graph.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_cfg.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_dfg.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_dump.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_func_info.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_inference.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_optimizer.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_ssa.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_alloc.c:zend_get_unmangled_property_name
zend_API.c:zend_get_unmangled_property_name
Line
Count
Source
990
6.04k
static zend_always_inline const char *zend_get_unmangled_property_name(const zend_string *mangled_prop) {
991
6.04k
  const char *class_name, *prop_name;
992
  zend_unmangle_property_name(mangled_prop, &class_name, &prop_name);
993
6.04k
  return prop_name;
994
6.04k
}
Unexecuted instantiation: zend_ast.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_attributes.c:zend_get_unmangled_property_name
zend_builtin_functions.c:zend_get_unmangled_property_name
Line
Count
Source
990
263
static zend_always_inline const char *zend_get_unmangled_property_name(const zend_string *mangled_prop) {
991
263
  const char *class_name, *prop_name;
992
  zend_unmangle_property_name(mangled_prop, &class_name, &prop_name);
993
263
  return prop_name;
994
263
}
Unexecuted instantiation: zend_call_stack.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_closures.c:zend_get_unmangled_property_name
zend_compile.c:zend_get_unmangled_property_name
Line
Count
Source
990
913
static zend_always_inline const char *zend_get_unmangled_property_name(const zend_string *mangled_prop) {
991
913
  const char *class_name, *prop_name;
992
  zend_unmangle_property_name(mangled_prop, &class_name, &prop_name);
993
913
  return prop_name;
994
913
}
Unexecuted instantiation: zend_constants.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_default_classes.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_dtrace.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_enum.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_exceptions.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_execute_API.c:zend_get_unmangled_property_name
zend_execute.c:zend_get_unmangled_property_name
Line
Count
Source
990
2.09k
static zend_always_inline const char *zend_get_unmangled_property_name(const zend_string *mangled_prop) {
991
2.09k
  const char *class_name, *prop_name;
992
  zend_unmangle_property_name(mangled_prop, &class_name, &prop_name);
993
2.09k
  return prop_name;
994
2.09k
}
Unexecuted instantiation: zend_extensions.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_fibers.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_float.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_gc.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_generators.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_hash.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_highlight.c:zend_get_unmangled_property_name
zend_inheritance.c:zend_get_unmangled_property_name
Line
Count
Source
990
249
static zend_always_inline const char *zend_get_unmangled_property_name(const zend_string *mangled_prop) {
991
249
  const char *class_name, *prop_name;
992
  zend_unmangle_property_name(mangled_prop, &class_name, &prop_name);
993
249
  return prop_name;
994
249
}
Unexecuted instantiation: zend_ini_parser.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_ini_scanner.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_ini.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_interfaces.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_iterators.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_language_parser.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_language_scanner.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_lazy_objects.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_list.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_multibyte.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_object_handlers.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_objects_API.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_objects.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_observer.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_opcode.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_operators.c:zend_get_unmangled_property_name
zend_property_hooks.c:zend_get_unmangled_property_name
Line
Count
Source
990
101
static zend_always_inline const char *zend_get_unmangled_property_name(const zend_string *mangled_prop) {
991
101
  const char *class_name, *prop_name;
992
  zend_unmangle_property_name(mangled_prop, &class_name, &prop_name);
993
101
  return prop_name;
994
101
}
Unexecuted instantiation: zend_signal.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_smart_str.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_stream.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_string.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_strtod.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_system_id.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_variables.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_weakrefs.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend.c:zend_get_unmangled_property_name
Unexecuted instantiation: internal_functions_cli.c:zend_get_unmangled_property_name
Unexecuted instantiation: fuzzer-parser.c:zend_get_unmangled_property_name
Unexecuted instantiation: fuzzer-sapi.c:zend_get_unmangled_property_name
Unexecuted instantiation: fuzzer-tracing-jit.c:zend_get_unmangled_property_name
Unexecuted instantiation: fuzzer-exif.c:zend_get_unmangled_property_name
Unexecuted instantiation: fuzzer-unserialize.c:zend_get_unmangled_property_name
Unexecuted instantiation: fuzzer-function-jit.c:zend_get_unmangled_property_name
Unexecuted instantiation: fuzzer-json.c:zend_get_unmangled_property_name
Unexecuted instantiation: fuzzer-unserializehash.c:zend_get_unmangled_property_name
Unexecuted instantiation: fuzzer-execute.c:zend_get_unmangled_property_name
995
996
5.21k
#define ZEND_FUNCTION_DTOR zend_function_dtor
997
0
#define ZEND_CLASS_DTOR destroy_zend_class
998
999
typedef bool (*zend_needs_live_range_cb)(const zend_op_array *op_array, const zend_op *opline);
1000
ZEND_API void zend_recalc_live_ranges(
1001
  zend_op_array *op_array, zend_needs_live_range_cb needs_live_range);
1002
1003
ZEND_API void pass_two(zend_op_array *op_array);
1004
ZEND_API bool zend_is_compiling(void);
1005
ZEND_API char *zend_make_compiled_string_description(const char *name);
1006
ZEND_API void zend_initialize_class_data(zend_class_entry *ce, bool nullify_handlers);
1007
uint32_t zend_get_class_fetch_type(const zend_string *name);
1008
ZEND_API uint8_t zend_get_call_op(const zend_op *init_op, const zend_function *fbc, bool result_used);
1009
ZEND_API bool zend_is_smart_branch(const zend_op *opline);
1010
1011
typedef bool (*zend_auto_global_callback)(zend_string *name);
1012
typedef struct _zend_auto_global {
1013
  zend_string *name;
1014
  zend_auto_global_callback auto_global_callback;
1015
  bool jit;
1016
  bool armed;
1017
} zend_auto_global;
1018
1019
ZEND_API zend_result zend_register_auto_global(zend_string *name, bool jit, zend_auto_global_callback auto_global_callback);
1020
ZEND_API void zend_activate_auto_globals(void);
1021
ZEND_API bool zend_is_auto_global(zend_string *name);
1022
ZEND_API bool zend_is_auto_global_str(const char *name, size_t len);
1023
ZEND_API size_t zend_dirname(char *path, size_t len);
1024
ZEND_API void zend_set_function_arg_flags(zend_function *func);
1025
1026
int ZEND_FASTCALL zendlex(zend_parser_stack_elem *elem);
1027
1028
void zend_assert_valid_class_name(const zend_string *const_name, const char *type);
1029
1030
zend_string *zend_type_to_string_resolved(zend_type type, zend_class_entry *scope);
1031
ZEND_API zend_string *zend_type_to_string(zend_type type);
1032
1033
/* BEGIN: OPCODES */
1034
1035
#include "zend_vm_opcodes.h"
1036
1037
/* END: OPCODES */
1038
1039
/* class fetches */
1040
6.17M
#define ZEND_FETCH_CLASS_DEFAULT  0
1041
44.9k
#define ZEND_FETCH_CLASS_SELF   1
1042
34.9k
#define ZEND_FETCH_CLASS_PARENT   2
1043
9.46k
#define ZEND_FETCH_CLASS_STATIC   3
1044
276
#define ZEND_FETCH_CLASS_AUTO   4
1045
6.06k
#define ZEND_FETCH_CLASS_INTERFACE  5
1046
3.33k
#define ZEND_FETCH_CLASS_TRAIT    6
1047
17.0k
#define ZEND_FETCH_CLASS_MASK        0x0f
1048
777k
#define ZEND_FETCH_CLASS_NO_AUTOLOAD 0x80
1049
237k
#define ZEND_FETCH_CLASS_SILENT      0x0100
1050
321k
#define ZEND_FETCH_CLASS_EXCEPTION   0x0200
1051
206k
#define ZEND_FETCH_CLASS_ALLOW_UNLINKED 0x0400
1052
6.55k
#define ZEND_FETCH_CLASS_ALLOW_NEARLY_LINKED 0x0800
1053
1054
/* These should not clash with ZEND_ACC_PPP_MASK and ZEND_ACC_PPP_SET_MASK */
1055
2.19M
#define ZEND_PARAM_REF      (1<<3)
1056
2.19M
#define ZEND_PARAM_VARIADIC (1<<4)
1057
1058
14.4M
#define ZEND_NAME_FQ       0
1059
1.57M
#define ZEND_NAME_NOT_FQ   1
1060
28.3M
#define ZEND_NAME_RELATIVE 2
1061
1062
/* ZEND_FETCH_ flags in class name AST of new const expression must not clash with ZEND_NAME_ flags */
1063
1.18k
#define ZEND_CONST_EXPR_NEW_FETCH_TYPE_SHIFT 2
1064
1065
388k
#define ZEND_TYPE_NULLABLE (1<<8)
1066
1067
1.31M
#define ZEND_ARRAY_SYNTAX_LIST 1  /* list() */
1068
6.86k
#define ZEND_ARRAY_SYNTAX_LONG 2  /* array() */
1069
91.6k
#define ZEND_ARRAY_SYNTAX_SHORT 3 /* [] */
1070
1071
/* var status for backpatching */
1072
6.35M
#define BP_VAR_R      0
1073
4.02M
#define BP_VAR_W      1
1074
3.53M
#define BP_VAR_RW     2
1075
24.0M
#define BP_VAR_IS     3
1076
358k
#define BP_VAR_FUNC_ARG   4
1077
1.70M
#define BP_VAR_UNSET    5
1078
1079
15.8M
#define ZEND_INTERNAL_FUNCTION    1
1080
2.85M
#define ZEND_USER_FUNCTION      2
1081
702k
#define ZEND_EVAL_CODE        4
1082
1083
17.9M
#define ZEND_USER_CODE(type)    ((type) != ZEND_INTERNAL_FUNCTION)
1084
1085
493k
#define ZEND_INTERNAL_CLASS         1
1086
161M
#define ZEND_USER_CLASS             2
1087
1088
4.68k
#define ZEND_EVAL       (1<<0)
1089
1.97k
#define ZEND_INCLUDE      (1<<1)
1090
189k
#define ZEND_INCLUDE_ONCE   (1<<2)
1091
1.09M
#define ZEND_REQUIRE      (1<<3)
1092
97.3k
#define ZEND_REQUIRE_ONCE   (1<<4)
1093
1094
/* global/local fetches */
1095
23.0k
#define ZEND_FETCH_GLOBAL   (1<<1)
1096
255k
#define ZEND_FETCH_LOCAL    (1<<2)
1097
52.4k
#define ZEND_FETCH_GLOBAL_LOCK  (1<<3)
1098
1099
#define ZEND_FETCH_TYPE_MASK  0xe
1100
1101
/* Only one of these can ever be in use */
1102
7.41k
#define ZEND_FETCH_REF      1
1103
5.26k
#define ZEND_FETCH_DIM_WRITE  2
1104
99.2k
#define ZEND_FETCH_OBJ_FLAGS  3
1105
1106
/* Used to mark what kind of operation a writing FETCH_DIM is used in,
1107
 * to produce a more precise error on incorrect string offset use. */
1108
6.85k
#define ZEND_FETCH_DIM_REF 1
1109
43.1k
#define ZEND_FETCH_DIM_DIM 2
1110
2.16k
#define ZEND_FETCH_DIM_OBJ 3
1111
374
#define ZEND_FETCH_DIM_INCDEC 4
1112
1113
10.7k
#define ZEND_ISEMPTY      (1<<0)
1114
1115
288k
#define ZEND_LAST_CATCH     (1<<0)
1116
1117
17.5k
#define ZEND_FREE_ON_RETURN     (1<<0)
1118
72.6k
#define ZEND_FREE_SWITCH        (1<<1)
1119
76.6k
#define ZEND_FREE_VOID_CAST     (1<<2)
1120
1121
0
#define ZEND_SEND_BY_VAL     0u
1122
2.10M
#define ZEND_SEND_BY_REF     1u
1123
1.98M
#define ZEND_SEND_PREFER_REF 2u
1124
1125
9.73k
#define ZEND_THROW_IS_EXPR 1u
1126
1127
6.58k
#define ZEND_FCALL_MAY_HAVE_EXTRA_NAMED_PARAMS 1
1128
1129
/* The send mode, the is_variadic, the is_promoted, and the is_tentative flags are stored as part of zend_type */
1130
1.19M
#define _ZEND_SEND_MODE_SHIFT _ZEND_TYPE_EXTRA_FLAGS_SHIFT
1131
33.4k
#define _ZEND_IS_VARIADIC_BIT (1 << (_ZEND_TYPE_EXTRA_FLAGS_SHIFT + 2))
1132
966
#define _ZEND_IS_PROMOTED_BIT (1 << (_ZEND_TYPE_EXTRA_FLAGS_SHIFT + 3))
1133
1.52k
#define _ZEND_IS_TENTATIVE_BIT (1 << (_ZEND_TYPE_EXTRA_FLAGS_SHIFT + 4))
1134
#define ZEND_ARG_SEND_MODE(arg_info) \
1135
90.5k
  ((ZEND_TYPE_FULL_MASK((arg_info)->type) >> _ZEND_SEND_MODE_SHIFT) & 3)
1136
#define ZEND_ARG_IS_VARIADIC(arg_info) \
1137
32.2k
  ((ZEND_TYPE_FULL_MASK((arg_info)->type) & _ZEND_IS_VARIADIC_BIT) != 0)
1138
#define ZEND_ARG_IS_PROMOTED(arg_info) \
1139
  ((ZEND_TYPE_FULL_MASK((arg_info)->type) & _ZEND_IS_PROMOTED_BIT) != 0)
1140
#define ZEND_ARG_TYPE_IS_TENTATIVE(arg_info) \
1141
1.52k
  ((ZEND_TYPE_FULL_MASK((arg_info)->type) & _ZEND_IS_TENTATIVE_BIT) != 0)
1142
1143
511k
#define ZEND_DIM_IS         (1 << 0) /* isset fetch needed for null coalesce. Set in zend_compile.c for ZEND_AST_DIM nested within ZEND_AST_COALESCE. */
1144
48.6k
#define ZEND_ALT_CASE_SYNTAX    (1 << 1) /* deprecated switch case terminated by semicolon */
1145
1146
/* Attributes for ${} encaps var in strings (ZEND_AST_DIM or ZEND_AST_VAR node) */
1147
/* ZEND_AST_VAR nodes can have any of the ZEND_ENCAPS_VAR_* flags */
1148
/* ZEND_AST_DIM flags can have ZEND_ENCAPS_VAR_DOLLAR_CURLY during the parse phase. */
1149
383k
#define ZEND_ENCAPS_VAR_DOLLAR_CURLY (1 << 0)
1150
381k
#define ZEND_ENCAPS_VAR_DOLLAR_CURLY_VAR_VAR (1 << 1)
1151
1152
/* Make sure these don't clash with ZEND_FETCH_CLASS_* flags. */
1153
#define IS_CONSTANT_CLASS                    0x400 /* __CLASS__ in trait */
1154
7.06M
#define IS_CONSTANT_UNQUALIFIED_IN_NAMESPACE 0x800
1155
1156
static zend_always_inline bool zend_check_arg_send_type(const zend_function *zf, uint32_t arg_num, uint32_t mask)
1157
2.14M
{
1158
2.14M
  arg_num--;
1159
2.14M
  if (UNEXPECTED(arg_num >= zf->common.num_args)) {
1160
1.36M
    if (EXPECTED((zf->common.fn_flags & ZEND_ACC_VARIADIC) == 0)) {
1161
1.10M
      return 0;
1162
1.10M
    }
1163
260k
    arg_num = zf->common.num_args;
1164
260k
  }
1165
1.04M
  return UNEXPECTED((ZEND_ARG_SEND_MODE(&zf->common.arg_info[arg_num]) & mask) != 0);
1166
2.14M
}
Unexecuted instantiation: php_date.c:zend_check_arg_send_type
Unexecuted instantiation: php_pcre.c:zend_check_arg_send_type
Unexecuted instantiation: exif.c:zend_check_arg_send_type
Unexecuted instantiation: hash_adler32.c:zend_check_arg_send_type
Unexecuted instantiation: hash_crc32.c:zend_check_arg_send_type
Unexecuted instantiation: hash_fnv.c:zend_check_arg_send_type
Unexecuted instantiation: hash_gost.c:zend_check_arg_send_type
Unexecuted instantiation: hash_haval.c:zend_check_arg_send_type
Unexecuted instantiation: hash_joaat.c:zend_check_arg_send_type
Unexecuted instantiation: hash_md.c:zend_check_arg_send_type
Unexecuted instantiation: hash_murmur.c:zend_check_arg_send_type
Unexecuted instantiation: hash_ripemd.c:zend_check_arg_send_type
Unexecuted instantiation: hash_sha_ni.c:zend_check_arg_send_type
Unexecuted instantiation: hash_sha_sse2.c:zend_check_arg_send_type
Unexecuted instantiation: hash_sha.c:zend_check_arg_send_type
Unexecuted instantiation: hash_sha3.c:zend_check_arg_send_type
Unexecuted instantiation: hash_snefru.c:zend_check_arg_send_type
Unexecuted instantiation: hash_tiger.c:zend_check_arg_send_type
Unexecuted instantiation: hash_whirlpool.c:zend_check_arg_send_type
Unexecuted instantiation: hash_xxhash.c:zend_check_arg_send_type
Unexecuted instantiation: hash.c:zend_check_arg_send_type
Unexecuted instantiation: json_encoder.c:zend_check_arg_send_type
Unexecuted instantiation: json_parser.tab.c:zend_check_arg_send_type
Unexecuted instantiation: json_scanner.c:zend_check_arg_send_type
Unexecuted instantiation: json.c:zend_check_arg_send_type
Unexecuted instantiation: php_lexbor.c:zend_check_arg_send_type
Unexecuted instantiation: shared_alloc_mmap.c:zend_check_arg_send_type
Unexecuted instantiation: shared_alloc_posix.c:zend_check_arg_send_type
Unexecuted instantiation: shared_alloc_shm.c:zend_check_arg_send_type
Unexecuted instantiation: zend_accelerator_api.c:zend_check_arg_send_type
Unexecuted instantiation: zend_accelerator_blacklist.c:zend_check_arg_send_type
Unexecuted instantiation: zend_accelerator_debug.c:zend_check_arg_send_type
Unexecuted instantiation: zend_accelerator_hash.c:zend_check_arg_send_type
Unexecuted instantiation: zend_accelerator_module.c:zend_check_arg_send_type
Unexecuted instantiation: zend_accelerator_util_funcs.c:zend_check_arg_send_type
Unexecuted instantiation: zend_file_cache.c:zend_check_arg_send_type
Unexecuted instantiation: zend_persist_calc.c:zend_check_arg_send_type
Unexecuted instantiation: zend_persist.c:zend_check_arg_send_type
Unexecuted instantiation: zend_shared_alloc.c:zend_check_arg_send_type
Unexecuted instantiation: ZendAccelerator.c:zend_check_arg_send_type
Unexecuted instantiation: zend_jit_vm_helpers.c:zend_check_arg_send_type
Unexecuted instantiation: zend_jit.c:zend_check_arg_send_type
Unexecuted instantiation: csprng.c:zend_check_arg_send_type
Unexecuted instantiation: engine_mt19937.c:zend_check_arg_send_type
Unexecuted instantiation: engine_pcgoneseq128xslrr64.c:zend_check_arg_send_type
Unexecuted instantiation: engine_secure.c:zend_check_arg_send_type
Unexecuted instantiation: engine_user.c:zend_check_arg_send_type
Unexecuted instantiation: engine_xoshiro256starstar.c:zend_check_arg_send_type
Unexecuted instantiation: gammasection.c:zend_check_arg_send_type
Unexecuted instantiation: random.c:zend_check_arg_send_type
Unexecuted instantiation: randomizer.c:zend_check_arg_send_type
Unexecuted instantiation: zend_utils.c:zend_check_arg_send_type
Unexecuted instantiation: php_reflection.c:zend_check_arg_send_type
Unexecuted instantiation: php_spl.c:zend_check_arg_send_type
Unexecuted instantiation: spl_array.c:zend_check_arg_send_type
Unexecuted instantiation: spl_directory.c:zend_check_arg_send_type
Unexecuted instantiation: spl_dllist.c:zend_check_arg_send_type
Unexecuted instantiation: spl_exceptions.c:zend_check_arg_send_type
Unexecuted instantiation: spl_fixedarray.c:zend_check_arg_send_type
Unexecuted instantiation: spl_functions.c:zend_check_arg_send_type
Unexecuted instantiation: spl_heap.c:zend_check_arg_send_type
Unexecuted instantiation: spl_iterators.c:zend_check_arg_send_type
Unexecuted instantiation: spl_observer.c:zend_check_arg_send_type
Unexecuted instantiation: array.c:zend_check_arg_send_type
Unexecuted instantiation: assert.c:zend_check_arg_send_type
Unexecuted instantiation: base64.c:zend_check_arg_send_type
Unexecuted instantiation: basic_functions.c:zend_check_arg_send_type
Unexecuted instantiation: browscap.c:zend_check_arg_send_type
Unexecuted instantiation: crc32_x86.c:zend_check_arg_send_type
Unexecuted instantiation: crc32.c:zend_check_arg_send_type
Unexecuted instantiation: credits.c:zend_check_arg_send_type
Unexecuted instantiation: crypt.c:zend_check_arg_send_type
Unexecuted instantiation: css.c:zend_check_arg_send_type
Unexecuted instantiation: datetime.c:zend_check_arg_send_type
Unexecuted instantiation: dir.c:zend_check_arg_send_type
Unexecuted instantiation: dl.c:zend_check_arg_send_type
Unexecuted instantiation: dns.c:zend_check_arg_send_type
Unexecuted instantiation: exec.c:zend_check_arg_send_type
Unexecuted instantiation: file.c:zend_check_arg_send_type
Unexecuted instantiation: filestat.c:zend_check_arg_send_type
Unexecuted instantiation: filters.c:zend_check_arg_send_type
Unexecuted instantiation: flock_compat.c:zend_check_arg_send_type
Unexecuted instantiation: formatted_print.c:zend_check_arg_send_type
Unexecuted instantiation: fsock.c:zend_check_arg_send_type
Unexecuted instantiation: ftok.c:zend_check_arg_send_type
Unexecuted instantiation: ftp_fopen_wrapper.c:zend_check_arg_send_type
Unexecuted instantiation: head.c:zend_check_arg_send_type
Unexecuted instantiation: hrtime.c:zend_check_arg_send_type
Unexecuted instantiation: html.c:zend_check_arg_send_type
Unexecuted instantiation: http_fopen_wrapper.c:zend_check_arg_send_type
Unexecuted instantiation: http.c:zend_check_arg_send_type
Unexecuted instantiation: image.c:zend_check_arg_send_type
Unexecuted instantiation: incomplete_class.c:zend_check_arg_send_type
Unexecuted instantiation: info.c:zend_check_arg_send_type
Unexecuted instantiation: iptc.c:zend_check_arg_send_type
Unexecuted instantiation: levenshtein.c:zend_check_arg_send_type
Unexecuted instantiation: link.c:zend_check_arg_send_type
Unexecuted instantiation: mail.c:zend_check_arg_send_type
Unexecuted instantiation: math.c:zend_check_arg_send_type
Unexecuted instantiation: md5.c:zend_check_arg_send_type
Unexecuted instantiation: metaphone.c:zend_check_arg_send_type
Unexecuted instantiation: microtime.c:zend_check_arg_send_type
Unexecuted instantiation: net.c:zend_check_arg_send_type
Unexecuted instantiation: pack.c:zend_check_arg_send_type
Unexecuted instantiation: pageinfo.c:zend_check_arg_send_type
Unexecuted instantiation: password.c:zend_check_arg_send_type
Unexecuted instantiation: php_fopen_wrapper.c:zend_check_arg_send_type
Unexecuted instantiation: proc_open.c:zend_check_arg_send_type
Unexecuted instantiation: quot_print.c:zend_check_arg_send_type
Unexecuted instantiation: scanf.c:zend_check_arg_send_type
Unexecuted instantiation: sha1.c:zend_check_arg_send_type
Unexecuted instantiation: soundex.c:zend_check_arg_send_type
Unexecuted instantiation: streamsfuncs.c:zend_check_arg_send_type
Unexecuted instantiation: string.c:zend_check_arg_send_type
Unexecuted instantiation: strnatcmp.c:zend_check_arg_send_type
Unexecuted instantiation: syslog.c:zend_check_arg_send_type
Unexecuted instantiation: type.c:zend_check_arg_send_type
Unexecuted instantiation: uniqid.c:zend_check_arg_send_type
Unexecuted instantiation: url_scanner_ex.c:zend_check_arg_send_type
Unexecuted instantiation: url.c:zend_check_arg_send_type
Unexecuted instantiation: user_filters.c:zend_check_arg_send_type
Unexecuted instantiation: uuencode.c:zend_check_arg_send_type
Unexecuted instantiation: var_unserializer.c:zend_check_arg_send_type
Unexecuted instantiation: var.c:zend_check_arg_send_type
Unexecuted instantiation: versioning.c:zend_check_arg_send_type
Unexecuted instantiation: crypt_sha256.c:zend_check_arg_send_type
Unexecuted instantiation: crypt_sha512.c:zend_check_arg_send_type
Unexecuted instantiation: php_crypt_r.c:zend_check_arg_send_type
Unexecuted instantiation: php_uri.c:zend_check_arg_send_type
Unexecuted instantiation: php_uri_common.c:zend_check_arg_send_type
Unexecuted instantiation: uri_parser_rfc3986.c:zend_check_arg_send_type
Unexecuted instantiation: uri_parser_whatwg.c:zend_check_arg_send_type
Unexecuted instantiation: uri_parser_php_parse_url.c:zend_check_arg_send_type
Unexecuted instantiation: explicit_bzero.c:zend_check_arg_send_type
Unexecuted instantiation: fopen_wrappers.c:zend_check_arg_send_type
Unexecuted instantiation: getopt.c:zend_check_arg_send_type
Unexecuted instantiation: main.c:zend_check_arg_send_type
Unexecuted instantiation: network.c:zend_check_arg_send_type
Unexecuted instantiation: output.c:zend_check_arg_send_type
Unexecuted instantiation: php_content_types.c:zend_check_arg_send_type
Unexecuted instantiation: php_ini_builder.c:zend_check_arg_send_type
Unexecuted instantiation: php_ini.c:zend_check_arg_send_type
Unexecuted instantiation: php_glob.c:zend_check_arg_send_type
Unexecuted instantiation: php_odbc_utils.c:zend_check_arg_send_type
Unexecuted instantiation: php_open_temporary_file.c:zend_check_arg_send_type
Unexecuted instantiation: php_scandir.c:zend_check_arg_send_type
Unexecuted instantiation: php_syslog.c:zend_check_arg_send_type
Unexecuted instantiation: php_ticks.c:zend_check_arg_send_type
Unexecuted instantiation: php_variables.c:zend_check_arg_send_type
Unexecuted instantiation: reentrancy.c:zend_check_arg_send_type
Unexecuted instantiation: rfc1867.c:zend_check_arg_send_type
Unexecuted instantiation: safe_bcmp.c:zend_check_arg_send_type
Unexecuted instantiation: SAPI.c:zend_check_arg_send_type
Unexecuted instantiation: snprintf.c:zend_check_arg_send_type
Unexecuted instantiation: spprintf.c:zend_check_arg_send_type
Unexecuted instantiation: strlcat.c:zend_check_arg_send_type
Unexecuted instantiation: strlcpy.c:zend_check_arg_send_type
Unexecuted instantiation: cast.c:zend_check_arg_send_type
Unexecuted instantiation: filter.c:zend_check_arg_send_type
Unexecuted instantiation: glob_wrapper.c:zend_check_arg_send_type
Unexecuted instantiation: memory.c:zend_check_arg_send_type
Unexecuted instantiation: mmap.c:zend_check_arg_send_type
Unexecuted instantiation: plain_wrapper.c:zend_check_arg_send_type
Unexecuted instantiation: streams.c:zend_check_arg_send_type
Unexecuted instantiation: transports.c:zend_check_arg_send_type
Unexecuted instantiation: userspace.c:zend_check_arg_send_type
Unexecuted instantiation: xp_socket.c:zend_check_arg_send_type
Unexecuted instantiation: block_pass.c:zend_check_arg_send_type
Unexecuted instantiation: compact_literals.c:zend_check_arg_send_type
Unexecuted instantiation: compact_vars.c:zend_check_arg_send_type
Unexecuted instantiation: dce.c:zend_check_arg_send_type
Unexecuted instantiation: dfa_pass.c:zend_check_arg_send_type
Unexecuted instantiation: escape_analysis.c:zend_check_arg_send_type
Unexecuted instantiation: nop_removal.c:zend_check_arg_send_type
optimize_func_calls.c:zend_check_arg_send_type
Line
Count
Source
1157
1.87k
{
1158
1.87k
  arg_num--;
1159
1.87k
  if (UNEXPECTED(arg_num >= zf->common.num_args)) {
1160
61
    if (EXPECTED((zf->common.fn_flags & ZEND_ACC_VARIADIC) == 0)) {
1161
51
      return 0;
1162
51
    }
1163
10
    arg_num = zf->common.num_args;
1164
10
  }
1165
1.82k
  return UNEXPECTED((ZEND_ARG_SEND_MODE(&zf->common.arg_info[arg_num]) & mask) != 0);
1166
1.87k
}
Unexecuted instantiation: optimize_temp_vars_5.c:zend_check_arg_send_type
Unexecuted instantiation: pass1.c:zend_check_arg_send_type
Unexecuted instantiation: pass3.c:zend_check_arg_send_type
Unexecuted instantiation: sccp.c:zend_check_arg_send_type
Unexecuted instantiation: scdf.c:zend_check_arg_send_type
Unexecuted instantiation: zend_call_graph.c:zend_check_arg_send_type
Unexecuted instantiation: zend_cfg.c:zend_check_arg_send_type
Unexecuted instantiation: zend_dfg.c:zend_check_arg_send_type
Unexecuted instantiation: zend_dump.c:zend_check_arg_send_type
Unexecuted instantiation: zend_func_info.c:zend_check_arg_send_type
Unexecuted instantiation: zend_inference.c:zend_check_arg_send_type
Unexecuted instantiation: zend_optimizer.c:zend_check_arg_send_type
Unexecuted instantiation: zend_ssa.c:zend_check_arg_send_type
Unexecuted instantiation: zend_alloc.c:zend_check_arg_send_type
Unexecuted instantiation: zend_API.c:zend_check_arg_send_type
Unexecuted instantiation: zend_ast.c:zend_check_arg_send_type
Unexecuted instantiation: zend_attributes.c:zend_check_arg_send_type
Unexecuted instantiation: zend_builtin_functions.c:zend_check_arg_send_type
Unexecuted instantiation: zend_call_stack.c:zend_check_arg_send_type
Unexecuted instantiation: zend_closures.c:zend_check_arg_send_type
zend_compile.c:zend_check_arg_send_type
Line
Count
Source
1157
274k
{
1158
274k
  arg_num--;
1159
274k
  if (UNEXPECTED(arg_num >= zf->common.num_args)) {
1160
34.4k
    if (EXPECTED((zf->common.fn_flags & ZEND_ACC_VARIADIC) == 0)) {
1161
25.4k
      return 0;
1162
25.4k
    }
1163
9.04k
    arg_num = zf->common.num_args;
1164
9.04k
  }
1165
249k
  return UNEXPECTED((ZEND_ARG_SEND_MODE(&zf->common.arg_info[arg_num]) & mask) != 0);
1166
274k
}
Unexecuted instantiation: zend_constants.c:zend_check_arg_send_type
Unexecuted instantiation: zend_default_classes.c:zend_check_arg_send_type
Unexecuted instantiation: zend_dtrace.c:zend_check_arg_send_type
Unexecuted instantiation: zend_enum.c:zend_check_arg_send_type
Unexecuted instantiation: zend_exceptions.c:zend_check_arg_send_type
zend_execute_API.c:zend_check_arg_send_type
Line
Count
Source
1157
554k
{
1158
554k
  arg_num--;
1159
554k
  if (UNEXPECTED(arg_num >= zf->common.num_args)) {
1160
14.8k
    if (EXPECTED((zf->common.fn_flags & ZEND_ACC_VARIADIC) == 0)) {
1161
12.6k
      return 0;
1162
12.6k
    }
1163
2.22k
    arg_num = zf->common.num_args;
1164
2.22k
  }
1165
541k
  return UNEXPECTED((ZEND_ARG_SEND_MODE(&zf->common.arg_info[arg_num]) & mask) != 0);
1166
554k
}
zend_execute.c:zend_check_arg_send_type
Line
Count
Source
1157
1.31M
{
1158
1.31M
  arg_num--;
1159
1.31M
  if (UNEXPECTED(arg_num >= zf->common.num_args)) {
1160
1.31M
    if (EXPECTED((zf->common.fn_flags & ZEND_ACC_VARIADIC) == 0)) {
1161
1.06M
      return 0;
1162
1.06M
    }
1163
249k
    arg_num = zf->common.num_args;
1164
249k
  }
1165
251k
  return UNEXPECTED((ZEND_ARG_SEND_MODE(&zf->common.arg_info[arg_num]) & mask) != 0);
1166
1.31M
}
Unexecuted instantiation: zend_extensions.c:zend_check_arg_send_type
Unexecuted instantiation: zend_fibers.c:zend_check_arg_send_type
Unexecuted instantiation: zend_float.c:zend_check_arg_send_type
Unexecuted instantiation: zend_gc.c:zend_check_arg_send_type
Unexecuted instantiation: zend_generators.c:zend_check_arg_send_type
Unexecuted instantiation: zend_hash.c:zend_check_arg_send_type
Unexecuted instantiation: zend_highlight.c:zend_check_arg_send_type
Unexecuted instantiation: zend_inheritance.c:zend_check_arg_send_type
Unexecuted instantiation: zend_ini_parser.c:zend_check_arg_send_type
Unexecuted instantiation: zend_ini_scanner.c:zend_check_arg_send_type
Unexecuted instantiation: zend_ini.c:zend_check_arg_send_type
Unexecuted instantiation: zend_interfaces.c:zend_check_arg_send_type
Unexecuted instantiation: zend_iterators.c:zend_check_arg_send_type
Unexecuted instantiation: zend_language_parser.c:zend_check_arg_send_type
Unexecuted instantiation: zend_language_scanner.c:zend_check_arg_send_type
Unexecuted instantiation: zend_lazy_objects.c:zend_check_arg_send_type
Unexecuted instantiation: zend_list.c:zend_check_arg_send_type
Unexecuted instantiation: zend_multibyte.c:zend_check_arg_send_type
Unexecuted instantiation: zend_object_handlers.c:zend_check_arg_send_type
Unexecuted instantiation: zend_objects_API.c:zend_check_arg_send_type
Unexecuted instantiation: zend_objects.c:zend_check_arg_send_type
Unexecuted instantiation: zend_observer.c:zend_check_arg_send_type
Unexecuted instantiation: zend_opcode.c:zend_check_arg_send_type
Unexecuted instantiation: zend_operators.c:zend_check_arg_send_type
Unexecuted instantiation: zend_property_hooks.c:zend_check_arg_send_type
Unexecuted instantiation: zend_signal.c:zend_check_arg_send_type
Unexecuted instantiation: zend_smart_str.c:zend_check_arg_send_type
Unexecuted instantiation: zend_stream.c:zend_check_arg_send_type
Unexecuted instantiation: zend_string.c:zend_check_arg_send_type
Unexecuted instantiation: zend_strtod.c:zend_check_arg_send_type
Unexecuted instantiation: zend_system_id.c:zend_check_arg_send_type
Unexecuted instantiation: zend_variables.c:zend_check_arg_send_type
Unexecuted instantiation: zend_weakrefs.c:zend_check_arg_send_type
Unexecuted instantiation: zend.c:zend_check_arg_send_type
Unexecuted instantiation: internal_functions_cli.c:zend_check_arg_send_type
Unexecuted instantiation: fuzzer-parser.c:zend_check_arg_send_type
Unexecuted instantiation: fuzzer-sapi.c:zend_check_arg_send_type
Unexecuted instantiation: fuzzer-tracing-jit.c:zend_check_arg_send_type
Unexecuted instantiation: fuzzer-exif.c:zend_check_arg_send_type
Unexecuted instantiation: fuzzer-unserialize.c:zend_check_arg_send_type
Unexecuted instantiation: fuzzer-function-jit.c:zend_check_arg_send_type
Unexecuted instantiation: fuzzer-json.c:zend_check_arg_send_type
Unexecuted instantiation: fuzzer-unserializehash.c:zend_check_arg_send_type
Unexecuted instantiation: fuzzer-execute.c:zend_check_arg_send_type
1167
1168
#define ARG_MUST_BE_SENT_BY_REF(zf, arg_num) \
1169
158k
  zend_check_arg_send_type(zf, arg_num, ZEND_SEND_BY_REF)
1170
1171
#define ARG_SHOULD_BE_SENT_BY_REF(zf, arg_num) \
1172
1.95M
  zend_check_arg_send_type(zf, arg_num, ZEND_SEND_BY_REF|ZEND_SEND_PREFER_REF)
1173
1174
#define ARG_MAY_BE_SENT_BY_REF(zf, arg_num) \
1175
38.1k
  zend_check_arg_send_type(zf, arg_num, ZEND_SEND_PREFER_REF)
1176
1177
/* Quick API to check first 12 arguments */
1178
4.13M
#define MAX_ARG_FLAG_NUM 12
1179
1180
#ifdef WORDS_BIGENDIAN
1181
# define ZEND_SET_ARG_FLAG(zf, arg_num, mask) do { \
1182
    (zf)->quick_arg_flags |= ((mask) << ((arg_num) - 1) * 2); \
1183
  } while (0)
1184
# define ZEND_CHECK_ARG_FLAG(zf, arg_num, mask) \
1185
  (((zf)->quick_arg_flags >> (((arg_num) - 1) * 2)) & (mask))
1186
#else
1187
1.12M
# define ZEND_SET_ARG_FLAG(zf, arg_num, mask) do { \
1188
1.12M
    (zf)->quick_arg_flags |= (((mask) << 6) << (arg_num) * 2); \
1189
1.12M
  } while (0)
1190
# define ZEND_CHECK_ARG_FLAG(zf, arg_num, mask) \
1191
27.8k
  (((zf)->quick_arg_flags >> (((arg_num) + 3) * 2)) & (mask))
1192
#endif
1193
1194
#define QUICK_ARG_MUST_BE_SENT_BY_REF(zf, arg_num) \
1195
12.0k
  ZEND_CHECK_ARG_FLAG(zf, arg_num, ZEND_SEND_BY_REF)
1196
1197
#define QUICK_ARG_SHOULD_BE_SENT_BY_REF(zf, arg_num) \
1198
15.8k
  ZEND_CHECK_ARG_FLAG(zf, arg_num, ZEND_SEND_BY_REF|ZEND_SEND_PREFER_REF)
1199
1200
#define QUICK_ARG_MAY_BE_SENT_BY_REF(zf, arg_num) \
1201
  ZEND_CHECK_ARG_FLAG(zf, arg_num, ZEND_SEND_PREFER_REF)
1202
1203
#define ZEND_RETURN_VAL 0
1204
#define ZEND_RETURN_REF 1
1205
1206
#define ZEND_BIND_VAL      0
1207
58.8k
#define ZEND_BIND_REF      1
1208
132k
#define ZEND_BIND_IMPLICIT 2
1209
11.3k
#define ZEND_BIND_EXPLICIT 4
1210
1211
26.7k
#define ZEND_RETURNS_FUNCTION (1<<0)
1212
1.92k
#define ZEND_RETURNS_VALUE    (1<<1)
1213
1214
70.1k
#define ZEND_ARRAY_ELEMENT_REF    (1<<0)
1215
9.58k
#define ZEND_ARRAY_NOT_PACKED   (1<<1)
1216
44.7k
#define ZEND_ARRAY_SIZE_SHIFT   2
1217
1218
/* Attribute for ternary inside parentheses */
1219
2.42k
#define ZEND_PARENTHESIZED_CONDITIONAL 1
1220
1221
/* Used to distinguish (parent::$prop)::get() from parent hook call. */
1222
1.78k
#define ZEND_PARENTHESIZED_STATIC_PROP 1
1223
1224
/* Used to disallow pipes with arrow functions that lead to confusing parse trees. */
1225
18.7k
#define ZEND_PARENTHESIZED_ARROW_FUNC 1
1226
1227
/* For "use" AST nodes and the seen symbol table */
1228
89.8k
#define ZEND_SYMBOL_CLASS    (1<<0)
1229
1.03M
#define ZEND_SYMBOL_FUNCTION (1<<1)
1230
7.31k
#define ZEND_SYMBOL_CONST    (1<<2)
1231
1232
/* All increment opcodes are even (decrement are odd) */
1233
3.46k
#define ZEND_IS_INCREMENT(opcode) (((opcode) & 1) == 0)
1234
1235
#define ZEND_IS_BINARY_ASSIGN_OP_OPCODE(opcode) \
1236
  (((opcode) >= ZEND_ADD) && ((opcode) <= ZEND_POW))
1237
1238
/* Pseudo-opcodes that are used only temporarily during compilation */
1239
2.11k
#define ZEND_GOTO  253
1240
2.67k
#define ZEND_BRK   254
1241
3.01k
#define ZEND_CONT  255
1242
1243
1244
END_EXTERN_C()
1245
1246
#define ZEND_CLONE_FUNC_NAME    "__clone"
1247
#define ZEND_CONSTRUCTOR_FUNC_NAME  "__construct"
1248
#define ZEND_DESTRUCTOR_FUNC_NAME "__destruct"
1249
#define ZEND_GET_FUNC_NAME          "__get"
1250
#define ZEND_SET_FUNC_NAME          "__set"
1251
#define ZEND_UNSET_FUNC_NAME        "__unset"
1252
#define ZEND_ISSET_FUNC_NAME        "__isset"
1253
#define ZEND_CALL_FUNC_NAME         "__call"
1254
#define ZEND_CALLSTATIC_FUNC_NAME   "__callstatic"
1255
#define ZEND_TOSTRING_FUNC_NAME     "__tostring"
1256
89
#define ZEND_INVOKE_FUNC_NAME       "__invoke"
1257
15
#define ZEND_DEBUGINFO_FUNC_NAME    "__debuginfo"
1258
1259
/* The following constants may be combined in CG(compiler_options)
1260
 * to change the default compiler behavior */
1261
1262
/* generate extended debug information */
1263
8.61M
#define ZEND_COMPILE_EXTENDED_STMT              (1<<0)
1264
6.43M
#define ZEND_COMPILE_EXTENDED_FCALL             (1<<1)
1265
#define ZEND_COMPILE_EXTENDED_INFO              (ZEND_COMPILE_EXTENDED_STMT|ZEND_COMPILE_EXTENDED_FCALL)
1266
1267
/* call op_array handler of extensions */
1268
1.22M
#define ZEND_COMPILE_HANDLE_OP_ARRAY            (1<<2)
1269
1270
/* generate ZEND_INIT_FCALL_BY_NAME for internal functions instead of ZEND_INIT_FCALL */
1271
302k
#define ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS  (1<<3)
1272
1273
/* don't perform early binding for classes inherited form internal ones;
1274
 * in namespaces assume that internal class that doesn't exist at compile-time
1275
 * may appear in run-time */
1276
46.7k
#define ZEND_COMPILE_IGNORE_INTERNAL_CLASSES    (1<<4)
1277
1278
/* generate ZEND_DECLARE_CLASS_DELAYED opcode to delay early binding */
1279
89.5k
#define ZEND_COMPILE_DELAYED_BINDING            (1<<5)
1280
1281
/* disable constant substitution at compile-time */
1282
125k
#define ZEND_COMPILE_NO_CONSTANT_SUBSTITUTION   (1<<6)
1283
1284
/* disable substitution of persistent constants at compile-time */
1285
20.1k
#define ZEND_COMPILE_NO_PERSISTENT_CONSTANT_SUBSTITUTION  (1<<8)
1286
1287
/* generate ZEND_INIT_FCALL_BY_NAME for userland functions instead of ZEND_INIT_FCALL */
1288
67.1k
#define ZEND_COMPILE_IGNORE_USER_FUNCTIONS      (1<<9)
1289
1290
/* force ZEND_ACC_USE_GUARDS for all classes */
1291
86.9k
#define ZEND_COMPILE_GUARDS           (1<<10)
1292
1293
/* disable builtin special case function calls */
1294
132k
#define ZEND_COMPILE_NO_BUILTINS        (1<<11)
1295
1296
/* result of compilation may be stored in file cache */
1297
0
#define ZEND_COMPILE_WITH_FILE_CACHE      (1<<12)
1298
1299
/* ignore functions and classes declared in other files */
1300
128k
#define ZEND_COMPILE_IGNORE_OTHER_FILES     (1<<13)
1301
1302
/* this flag is set when compiler invoked by opcache_compile_file() */
1303
72.3k
#define ZEND_COMPILE_WITHOUT_EXECUTION          (1<<14)
1304
1305
/* this flag is set when compiler invoked during preloading */
1306
1.36M
#define ZEND_COMPILE_PRELOAD                    (1<<15)
1307
1308
/* disable jumptable optimization for switch statements */
1309
2.42k
#define ZEND_COMPILE_NO_JUMPTABLES        (1<<16)
1310
1311
/* this flag is set when compiler invoked during preloading in separate process */
1312
0
#define ZEND_COMPILE_PRELOAD_IN_CHILD           (1<<17)
1313
1314
/* ignore observer notifications, e.g. to manually notify afterwards in a post-processing step after compilation */
1315
74.9k
#define ZEND_COMPILE_IGNORE_OBSERVER      (1<<18)
1316
1317
/* The default value for CG(compiler_options) */
1318
16
#define ZEND_COMPILE_DEFAULT          ZEND_COMPILE_HANDLE_OP_ARRAY
1319
1320
/* The default value for CG(compiler_options) during eval() */
1321
0
#define ZEND_COMPILE_DEFAULT_FOR_EVAL     0
1322
1323
ZEND_API bool zend_is_op_long_compatible(const zval *op);
1324
ZEND_API bool zend_binary_op_produces_error(uint32_t opcode, const zval *op1, const zval *op2);
1325
ZEND_API bool zend_unary_op_produces_error(uint32_t opcode, const zval *op);
1326
1327
bool zend_try_ct_eval_cast(zval *result, uint32_t type, zval *op1);
1328
1329
#endif /* ZEND_COMPILE_H */