Coverage Report

Created: 2026-04-01 06:49

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
154M
#define SET_UNUSED(op) do { \
37
154M
  op ## _type = IS_UNUSED; \
38
154M
  op.num = (uint32_t) -1; \
39
154M
} while (0)
40
41
51.0M
#define MAKE_NOP(opline) do { \
42
51.0M
  (opline)->opcode = ZEND_NOP; \
43
51.0M
  SET_UNUSED((opline)->op1); \
44
51.0M
  SET_UNUSED((opline)->op2); \
45
51.0M
  SET_UNUSED((opline)->result); \
46
51.0M
} while (0)
47
48
1.07M
#define RESET_DOC_COMMENT() do { \
49
1.07M
  if (CG(doc_comment)) { \
50
9.73k
    zend_string_release_ex(CG(doc_comment), 0); \
51
9.73k
    CG(doc_comment) = NULL; \
52
9.73k
  } \
53
1.07M
} 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
533k
# 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
137k
static zend_always_inline znode *zend_ast_get_znode(zend_ast *ast) {
103
137k
  return &((zend_ast_znode *) ast)->node;
104
137k
}
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_autoload.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
137k
static zend_always_inline znode *zend_ast_get_znode(zend_ast *ast) {
103
137k
  return &((zend_ast_znode *) ast)->node;
104
137k
}
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.25M
#define ZEND_LIVE_TMPVAR  0
181
38.0k
#define ZEND_LIVE_LOOP    1
182
9.75M
#define ZEND_LIVE_SILENCE 2
183
67.0k
#define ZEND_LIVE_ROPE    3
184
442k
#define ZEND_LIVE_NEW     4
185
628k
#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.45M
#define ZEND_ACC_PUBLIC                  (1 <<  0) /*     |  X  |  X  |  X  */
221
18.9M
#define ZEND_ACC_PROTECTED               (1 <<  1) /*     |  X  |  X  |  X  */
222
19.7M
#define ZEND_ACC_PRIVATE                 (1 <<  2) /*     |  X  |  X  |  X  */
223
/*                                                        |     |     |     */
224
/* Property or method overrides private one               |     |     |     */
225
18.4M
#define ZEND_ACC_CHANGED                 (1 <<  3) /*     |  X  |  X  |     */
226
/*                                                        |     |     |     */
227
/* Static method or property                              |     |     |     */
228
1.25M
#define ZEND_ACC_STATIC                  (1 <<  4) /*     |  X  |  X  |     */
229
/*                                                        |     |     |     */
230
/* Final class or method                                  |     |     |     */
231
1.06M
#define ZEND_ACC_FINAL                   (1 <<  5) /*  X  |  X  |  X  |  X  */
232
/*                                                        |     |     |     */
233
/* Abstract method                                        |     |     |     */
234
633k
#define ZEND_ACC_ABSTRACT                (1 <<  6) /*  X  |  X  |  X  |     */
235
217k
#define ZEND_ACC_EXPLICIT_ABSTRACT_CLASS (1 <<  6) /*  X  |     |     |     */
236
/*                                                        |     |     |     */
237
/* Readonly property                                      |     |     |     */
238
1.12M
#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
586k
#define ZEND_ACC_IMMUTABLE               (1 <<  7) /*  X  |  X  |     |     */
243
/*                                                        |     |     |     */
244
/* Function has typed arguments / class has typed props   |     |     |     */
245
1.91M
#define ZEND_ACC_HAS_TYPE_HINTS          (1 <<  8) /*  X  |  X  |     |     */
246
/*                                                        |     |     |     */
247
/* Top-level class or function declaration                |     |     |     */
248
53.6k
#define ZEND_ACC_TOP_LEVEL               (1 <<  9) /*  X  |  X  |     |     */
249
/*                                                        |     |     |     */
250
/* op_array or class is preloaded                         |     |     |     */
251
64.3k
#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
12.5k
#define ZEND_CLASS_CONST_IS_CASE         (1 <<  6) /*     |     |     |  X  */
257
/*                                                        |     |     |     */
258
/* deprecation flag                                       |     |     |     */
259
84.0k
#define ZEND_ACC_DEPRECATED              (1 << 11) /*  X  |  X  |     |  X  */
260
/*                                                        |     |     |     */
261
/* has #[\Override] attribute                             |     |     |     */
262
106k
#define ZEND_ACC_OVERRIDE                (1 << 28) /*     |  X  |  X  |     */
263
/*                                                        |     |     |     */
264
/* Property Flags (unused: 13-27,29...)                   |     |     |     */
265
/* ===========                                            |     |     |     */
266
/*                                                        |     |     |     */
267
/* Promoted property / parameter                          |     |     |     */
268
931
#define ZEND_ACC_PROMOTED                (1 <<  8) /*     |     |  X  |     */
269
/*                                                        |     |     |     */
270
/* Virtual property without backing storage               |     |     |     */
271
211k
#define ZEND_ACC_VIRTUAL                 (1 <<  9) /*     |     |  X  |     */
272
/*                                                        |     |     |     */
273
/* Asymmetric visibility                                  |     |     |     */
274
1.00M
#define ZEND_ACC_PUBLIC_SET              (1 << 10) /*     |     |  X  |     */
275
1.00M
#define ZEND_ACC_PROTECTED_SET           (1 << 11) /*     |     |  X  |     */
276
1.00M
#define ZEND_ACC_PRIVATE_SET             (1 << 12) /*     |     |  X  |     */
277
/*                                                        |     |     |     */
278
/* Class Flags (unused: 31)                               |     |     |     */
279
/* ===========                                            |     |     |     */
280
/*                                                        |     |     |     */
281
/* Special class types                                    |     |     |     */
282
19.6M
#define ZEND_ACC_INTERFACE               (1 <<  0) /*  X  |     |     |     */
283
486k
#define ZEND_ACC_TRAIT                   (1 <<  1) /*  X  |     |     |     */
284
1.10M
#define ZEND_ACC_ANON_CLASS              (1 <<  2) /*  X  |     |     |     */
285
443k
#define ZEND_ACC_ENUM                    (1 << 28) /*  X  |     |     |     */
286
/*                                                        |     |     |     */
287
/* Class linked with parent, interfaces and traits        |     |     |     */
288
998k
#define ZEND_ACC_LINKED                  (1 <<  3) /*  X  |     |     |     */
289
/*                                                        |     |     |     */
290
/* Class is abstract, since it is set by any              |     |     |     */
291
/* abstract method                                        |     |     |     */
292
391k
#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.98M
#define ZEND_ACC_USE_GUARDS              (1 << 30) /*  X  |     |     |     */
297
/*                                                        |     |     |     */
298
/* Class constants updated                                |     |     |     */
299
221k
#define ZEND_ACC_CONSTANTS_UPDATED       (1 << 12) /*  X  |     |     |     */
300
/*                                                        |     |     |     */
301
/* Objects of this class may not have dynamic properties  |     |     |     */
302
5.63k
#define ZEND_ACC_NO_DYNAMIC_PROPERTIES   (1 << 13) /*  X  |     |     |     */
303
/*                                                        |     |     |     */
304
/* User class has methods with static variables           |     |     |     */
305
37.2M
#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
787k
#define ZEND_ACC_ALLOW_DYNAMIC_PROPERTIES (1 << 15) /* X  |     |     |     */
310
/*                                                        |     |     |     */
311
/* Readonly class                                         |     |     |     */
312
36.3k
#define ZEND_ACC_READONLY_CLASS          (1 << 16) /*  X  |     |     |     */
313
/*                                                        |     |     |     */
314
/* Parent class is resolved (CE).                         |     |     |     */
315
40.4k
#define ZEND_ACC_RESOLVED_PARENT         (1 << 17) /*  X  |     |     |     */
316
/*                                                        |     |     |     */
317
/* Interfaces are resolved (CEs).                         |     |     |     */
318
31.8k
#define ZEND_ACC_RESOLVED_INTERFACES     (1 << 18) /*  X  |     |     |     */
319
/*                                                        |     |     |     */
320
/* Class has unresolved variance obligations.             |     |     |     */
321
6.74k
#define ZEND_ACC_UNRESOLVED_VARIANCE     (1 << 19) /*  X  |     |     |     */
322
/*                                                        |     |     |     */
323
/* Class is linked apart from variance obligations.       |     |     |     */
324
886
#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
328k
#define ZEND_ACC_CACHED                  (1 << 22) /*  X  |     |     |     */
330
/*                                                        |     |     |     */
331
/* temporary flag used during delayed variance checks     |     |     |     */
332
1.13k
#define ZEND_ACC_CACHEABLE               (1 << 23) /*  X  |     |     |     */
333
/*                                                        |     |     |     */
334
15.3k
#define ZEND_ACC_HAS_AST_CONSTANTS       (1 << 24) /*  X  |     |     |     */
335
914k
#define ZEND_ACC_HAS_AST_PROPERTIES      (1 << 25) /*  X  |     |     |     */
336
1.73k
#define ZEND_ACC_HAS_AST_STATICS         (1 << 26) /*  X  |     |     |     */
337
/*                                                        |     |     |     */
338
/* loaded from file cache to process memory               |     |     |     */
339
157k
#define ZEND_ACC_FILE_CACHED             (1 << 27) /*  X  |     |     |     */
340
/*                                                        |     |     |     */
341
/* Class cannot be serialized or unserialized             |     |     |     */
342
944k
#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.26M
#define ZEND_ACC_RETURN_REFERENCE        (1 << 12) /*     |  X  |     |     */
354
/*                                                        |     |     |     */
355
/* Function has a return type                             |     |     |     */
356
1.73M
#define ZEND_ACC_HAS_RETURN_TYPE         (1 << 13) /*     |  X  |     |     */
357
/*                                                        |     |     |     */
358
/* Function with variable number of arguments             |     |     |     */
359
2.80M
#define ZEND_ACC_VARIADIC                (1 << 14) /*     |  X  |     |     */
360
/*                                                        |     |     |     */
361
/* op_array has finally blocks (user only)                |     |     |     */
362
398k
#define ZEND_ACC_HAS_FINALLY_BLOCK       (1 << 15) /*     |  X  |     |     */
363
/*                                                        |     |     |     */
364
/* "main" op_array with                                   |     |     |     */
365
/* ZEND_DECLARE_CLASS_DELAYED opcodes                     |     |     |     */
366
50.0k
#define ZEND_ACC_EARLY_BINDING           (1 << 16) /*     |  X  |     |     */
367
/*                                                        |     |     |     */
368
/* closure uses $this                                     |     |     |     */
369
26.4k
#define ZEND_ACC_USES_THIS               (1 << 17) /*     |  X  |     |     */
370
/*                                                        |     |     |     */
371
/* call through user function trampoline. e.g.            |     |     |     */
372
/* __call, __callstatic                                   |     |     |     */
373
884k
#define ZEND_ACC_CALL_VIA_TRAMPOLINE     (1 << 18) /*     |  X  |     |     */
374
/*                                                        |     |     |     */
375
/* disable inline caching                                 |     |     |     */
376
1.04k
#define ZEND_ACC_NEVER_CACHE             (1 << 19) /*     |  X  |     |     */
377
/*                                                        |     |     |     */
378
/* op_array is a clone of trait method                    |     |     |     */
379
66.9k
#define ZEND_ACC_TRAIT_CLONE             (1 << 20) /*     |  X  |     |     */
380
/*                                                        |     |     |     */
381
/* functions is a constructor                             |     |     |     */
382
23.1k
#define ZEND_ACC_CTOR                    (1 << 21) /*     |  X  |     |     */
383
/*                                                        |     |     |     */
384
/* Closure related                                        |     |     |     */
385
3.93M
#define ZEND_ACC_CLOSURE                 (1 << 22) /*     |  X  |     |     */
386
2.22M
#define ZEND_ACC_FAKE_CLOSURE            (1 << 23) /*     |  X  |     |     */ /* Same as ZEND_CALL_FAKE_CLOSURE */
387
/*                                                        |     |     |     */
388
2.34M
#define ZEND_ACC_GENERATOR               (1 << 24) /*     |  X  |     |     */
389
/*                                                        |     |     |     */
390
/* function was processed by pass two (user only)         |     |     |     */
391
2.93M
#define ZEND_ACC_DONE_PASS_TWO           (1 << 25) /*     |  X  |     |     */
392
/*                                                        |     |     |     */
393
/* internal function is allocated at arena (int only)     |     |     |     */
394
36.0k
#define ZEND_ACC_ARENA_ALLOCATED         (1 << 25) /*     |  X  |     |     */
395
/*                                                        |     |     |     */
396
/* run_time_cache allocated on heap (user only)           |     |     |     */
397
477k
#define ZEND_ACC_HEAP_RT_CACHE           (1 << 26) /*     |  X  |     |     */
398
/*                                                        |     |     |     */
399
/* method flag used by Closure::__invoke() (int only)     |     |     |     */
400
634
#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
357k
#define ZEND_ACC_PTR_OPS                 (1 << 28) /*     |  X  |     |     */
409
/*                                                        |     |     |     */
410
/* has #[\NoDiscard] attribute                            |     |     |     */
411
8.33M
#define ZEND_ACC_NODISCARD               (1 << 29) /*     |  X  |     |     */
412
/*                                                        |     |     |     */
413
/* op_array uses strict mode types                        |     |     |     */
414
5.21M
#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.09M
#define ZEND_ACC_PPP_MASK  (ZEND_ACC_PUBLIC | ZEND_ACC_PROTECTED | ZEND_ACC_PRIVATE)
422
986k
#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
608
{
426
608
  switch (visibility) {
427
583
    case ZEND_ACC_PUBLIC:
428
583
      return ZEND_ACC_PUBLIC_SET;
429
10
    case ZEND_ACC_PROTECTED:
430
10
      return ZEND_ACC_PROTECTED_SET;
431
15
    case ZEND_ACC_PRIVATE:
432
15
      return ZEND_ACC_PRIVATE_SET;
433
0
    EMPTY_SWITCH_DEFAULT_CASE();
434
608
  }
435
608
}
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
586
{
426
586
  switch (visibility) {
427
567
    case ZEND_ACC_PUBLIC:
428
567
      return ZEND_ACC_PUBLIC_SET;
429
4
    case ZEND_ACC_PROTECTED:
430
4
      return ZEND_ACC_PROTECTED_SET;
431
15
    case ZEND_ACC_PRIVATE:
432
15
      return ZEND_ACC_PRIVATE_SET;
433
0
    EMPTY_SWITCH_DEFAULT_CASE();
434
586
  }
435
586
}
Unexecuted instantiation: zend_ast.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_attributes.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_autoload.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
22
{
426
22
  switch (visibility) {
427
16
    case ZEND_ACC_PUBLIC:
428
16
      return ZEND_ACC_PUBLIC_SET;
429
6
    case ZEND_ACC_PROTECTED:
430
6
      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
22
  }
435
22
}
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
349
#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
86.3k
#define ZEND_SHORT_CIRCUITING_CHAIN_MASK 0x3
449
130k
#define ZEND_SHORT_CIRCUITING_CHAIN_EXPR 0
450
364
#define ZEND_SHORT_CIRCUITING_CHAIN_ISSET 1
451
72
#define ZEND_SHORT_CIRCUITING_CHAIN_EMPTY 2
452
453
// Must not clash with ZEND_SHORT_CIRCUITING_CHAIN_MASK
454
54.1k
#define ZEND_JMP_NULL_BP_VAR_IS 4
455
456
const char *zend_visibility_string(uint32_t fn_flags);
457
458
53.4k
#define ZEND_PROPERTY_HOOK_COUNT 2
459
8.55k
#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.56k
#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
15.7M
  ((zval*)((char*)(obj) + offset))
481
#define OBJ_PROP_NUM(obj, num) \
482
2.64M
  (&(obj)->properties_table[(num)])
483
#define OBJ_PROP_TO_OFFSET(num) \
484
92.3k
  ((uint32_t)(XtOffsetOf(zend_object, properties_table) + sizeof(zval) * (num)))
485
#define OBJ_PROP_TO_NUM(offset) \
486
61.2k
  (((offset) - OBJ_PROP_TO_OFFSET(0)) / sizeof(zval))
487
#define OBJ_PROP_SLOT_TO_OFFSET(obj, slot) \
488
155
  ((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
54.5k
#define ZEND_CLASS_CONST_FLAGS(c) Z_CONSTANT_FLAGS((c)->value)
499
500
C23_ENUM(zend_function_type, uint8_t) {
501
  ZEND_INTERNAL_FUNCTION = 1,
502
  ZEND_USER_FUNCTION = 2,
503
  ZEND_EVAL_CODE = 4,
504
};
505
506
/* arg_info for internal functions */
507
typedef struct _zend_internal_arg_info {
508
  const char *name;
509
  zend_type type;
510
  const char *default_value;
511
} zend_internal_arg_info;
512
513
/* arg_info for user functions */
514
typedef struct _zend_arg_info {
515
  zend_string *name;
516
  zend_type type;
517
  zend_string *default_value;
518
} zend_arg_info;
519
520
/* the following structure repeats the layout of zend_internal_arg_info,
521
 * but its fields have different meaning. It's used as the first element of
522
 * arg_info array to define properties of internal functions.
523
 * It's also used for the return type.
524
 */
525
typedef struct _zend_internal_function_info {
526
  uintptr_t required_num_args;
527
  zend_type type;
528
  const char *default_value;
529
} zend_internal_function_info;
530
531
struct _zend_op_array {
532
  /* Common elements */
533
  zend_function_type type;
534
  uint8_t arg_flags[3]; /* bitset of arg_info.pass_by_reference */
535
  uint32_t fn_flags;
536
  zend_string *function_name;
537
  zend_class_entry *scope;
538
  zend_function *prototype;
539
  uint32_t num_args;
540
  uint32_t required_num_args;
541
  zend_arg_info *arg_info;
542
  HashTable *attributes;
543
  ZEND_MAP_PTR_DEF(void **, run_time_cache);
544
  zend_string *doc_comment;
545
  uint32_t T;         /* number of temporary variables */
546
  uint32_t fn_flags2;
547
  const zend_property_info *prop_info; /* The corresponding prop_info if this is a hook. */
548
  /* END of common elements */
549
550
  uint32_t cache_size; /* number of run_time_cache_slots * sizeof(void*) */
551
  int last_var;        /* number of CV variables */
552
  uint32_t last;       /* number of opcodes */
553
554
  zend_op *opcodes;
555
  ZEND_MAP_PTR_DEF(HashTable *, static_variables_ptr);
556
  HashTable *static_variables;
557
  zend_string **vars; /* names of CV variables */
558
559
  uint32_t *refcount;
560
561
  uint32_t last_live_range;
562
  uint32_t last_try_catch;
563
  zend_live_range *live_range;
564
  zend_try_catch_element *try_catch_array;
565
566
  zend_string *filename;
567
  uint32_t line_start;
568
  uint32_t line_end;
569
570
  uint32_t last_literal;
571
  uint32_t num_dynamic_func_defs;
572
  zval *literals;
573
574
  /* Functions that are declared dynamically are stored here and
575
   * referenced by index from opcodes. */
576
  zend_op_array **dynamic_func_defs;
577
578
  void *reserved[ZEND_MAX_RESERVED_RESOURCES];
579
};
580
581
582
#define ZEND_RETURN_VALUE       0
583
#define ZEND_RETURN_REFERENCE     1
584
585
#define INTERNAL_FUNCTION_PARAMETERS zend_execute_data *execute_data, zval *return_value
586
20.0k
#define INTERNAL_FUNCTION_PARAM_PASSTHRU execute_data, return_value
587
588
/* zend_internal_function_handler */
589
typedef void (ZEND_FASTCALL *zif_handler)(INTERNAL_FUNCTION_PARAMETERS);
590
591
typedef struct _zend_internal_function {
592
  /* Common elements */
593
  zend_function_type type;
594
  uint8_t arg_flags[3]; /* bitset of arg_info.pass_by_reference */
595
  uint32_t fn_flags;
596
  zend_string* function_name;
597
  zend_class_entry *scope;
598
  zend_function *prototype;
599
  uint32_t num_args;
600
  uint32_t required_num_args;
601
  zend_arg_info *arg_info;
602
  HashTable *attributes;
603
  ZEND_MAP_PTR_DEF(void **, run_time_cache);
604
  zend_string *doc_comment;
605
  uint32_t T;         /* number of temporary variables */
606
  uint32_t fn_flags2;
607
  const zend_property_info *prop_info; /* The corresponding prop_info if this is a hook. */
608
  /* END of common elements */
609
610
  zif_handler handler;
611
  struct _zend_module_entry *module;
612
  const zend_frameless_function_info *frameless_function_infos;
613
  void *reserved[ZEND_MAX_RESERVED_RESOURCES];
614
} zend_internal_function;
615
616
413
#define ZEND_FN_SCOPE_NAME(function)  ((function) && (function)->common.scope ? ZSTR_VAL((function)->common.scope->name) : "")
617
618
union _zend_function {
619
  zend_function_type type;  /* MUST be the first element of this struct! */
620
  uint32_t   quick_arg_flags;
621
622
  struct {
623
    zend_function_type type;  /* never used */
624
    uint8_t arg_flags[3]; /* bitset of arg_info.pass_by_reference */
625
    uint32_t fn_flags;
626
    zend_string *function_name;
627
    zend_class_entry *scope;
628
    zend_function *prototype;
629
    uint32_t num_args;
630
    uint32_t required_num_args;
631
    zend_arg_info *arg_info;  /* index -1 represents the return value info, if any */
632
    HashTable   *attributes;
633
    ZEND_MAP_PTR_DEF(void **, run_time_cache);
634
    zend_string *doc_comment;
635
    uint32_t T;         /* number of temporary variables */
636
    uint32_t fn_flags2;
637
    const zend_property_info *prop_info; /* The corresponding prop_info if this is a hook. */
638
  } common;
639
640
  zend_op_array op_array;
641
  zend_internal_function internal_function;
642
};
643
644
struct _zend_execute_data {
645
  const zend_op       *opline;           /* executed opline                */
646
  zend_execute_data   *call;             /* current call                   */
647
  zval                *return_value;
648
  zend_function       *func;             /* executed function              */
649
  zval                 This;             /* this + call_info + num_args    */
650
  zend_execute_data   *prev_execute_data;
651
  zend_array          *symbol_table;
652
  void               **run_time_cache;   /* cache op_array->run_time_cache */
653
  zend_array          *extra_named_params;
654
};
655
656
1.40M
#define ZEND_CALL_HAS_THIS           IS_OBJECT_EX
657
658
/* Top 16 bits of Z_TYPE_INFO(EX(This)) are used as call_info flags */
659
1.86M
#define ZEND_CALL_FUNCTION           (0 << 16)
660
162k
#define ZEND_CALL_CODE               (1 << 16)
661
766k
#define ZEND_CALL_NESTED             (0 << 17)
662
874k
#define ZEND_CALL_TOP                (1 << 17)
663
366
#define ZEND_CALL_ALLOCATED          (1 << 18)
664
4.44k
#define ZEND_CALL_FREE_EXTRA_ARGS    (1 << 19)
665
311k
#define ZEND_CALL_HAS_SYMBOL_TABLE   (1 << 20)
666
533k
#define ZEND_CALL_RELEASE_THIS       (1 << 21)
667
21.1k
#define ZEND_CALL_CLOSURE            (1 << 22)
668
53
#define ZEND_CALL_FAKE_CLOSURE       (1 << 23) /* Same as ZEND_ACC_FAKE_CLOSURE */
669
5.73k
#define ZEND_CALL_GENERATOR          (1 << 24)
670
789k
#define ZEND_CALL_DYNAMIC            (1 << 25)
671
#define ZEND_CALL_MAY_HAVE_UNDEF     (1 << 26)
672
771k
#define ZEND_CALL_HAS_EXTRA_NAMED_PARAMS (1 << 27)
673
#define ZEND_CALL_OBSERVED           (1 << 28) /* "fcall_begin" observer handler may set this flag */
674
                                               /* to prevent optimization in RETURN handler and    */
675
                                               /* keep all local variables for "fcall_end" handler */
676
0
#define ZEND_CALL_JIT_RESERVED       (1 << 29) /* reserved for tracing JIT */
677
112k
#define ZEND_CALL_NEEDS_REATTACH     (1 << 30)
678
#define ZEND_CALL_SEND_ARG_BY_REF    (1u << 31)
679
680
687k
#define ZEND_CALL_NESTED_FUNCTION    (ZEND_CALL_FUNCTION | ZEND_CALL_NESTED)
681
74.1k
#define ZEND_CALL_NESTED_CODE        (ZEND_CALL_CODE | ZEND_CALL_NESTED)
682
780k
#define ZEND_CALL_TOP_FUNCTION       (ZEND_CALL_TOP | ZEND_CALL_FUNCTION)
683
87.8k
#define ZEND_CALL_TOP_CODE           (ZEND_CALL_CODE | ZEND_CALL_TOP)
684
685
#define ZEND_CALL_INFO(call) \
686
4.83M
  Z_TYPE_INFO((call)->This)
687
688
#define ZEND_CALL_KIND_EX(call_info) \
689
  (call_info & (ZEND_CALL_CODE | ZEND_CALL_TOP))
690
691
#define ZEND_CALL_KIND(call) \
692
  ZEND_CALL_KIND_EX(ZEND_CALL_INFO(call))
693
694
148k
#define ZEND_ADD_CALL_FLAG_EX(call_info, flag) do { \
695
148k
    call_info |= (flag); \
696
148k
  } while (0)
697
698
364
#define ZEND_DEL_CALL_FLAG_EX(call_info, flag) do { \
699
364
    call_info &= ~(flag); \
700
364
  } while (0)
701
702
143k
#define ZEND_ADD_CALL_FLAG(call, flag) do { \
703
143k
    ZEND_ADD_CALL_FLAG_EX(Z_TYPE_INFO((call)->This), flag); \
704
143k
  } while (0)
705
706
364
#define ZEND_DEL_CALL_FLAG(call, flag) do { \
707
364
    ZEND_DEL_CALL_FLAG_EX(Z_TYPE_INFO((call)->This), flag); \
708
364
  } while (0)
709
710
#define ZEND_CALL_NUM_ARGS(call) \
711
14.6M
  (call)->This.u2.num_args
712
713
/* Ensure the correct alignment before slots calculation */
714
ZEND_STATIC_ASSERT(ZEND_MM_ALIGNED_SIZE(sizeof(zval)) == sizeof(zval),
715
                   "zval must be aligned by ZEND_MM_ALIGNMENT");
716
/* A number of call frame slots (zvals) reserved for zend_execute_data. */
717
#define ZEND_CALL_FRAME_SLOT \
718
167M
  ((int)((sizeof(zend_execute_data) + sizeof(zval) - 1) / sizeof(zval)))
719
720
#define ZEND_CALL_VAR(call, n) \
721
18.3M
  ((zval*)(((char*)(call)) + ((int)(n))))
722
723
#define ZEND_CALL_VAR_NUM(call, n) \
724
7.90M
  (((zval*)(call)) + (ZEND_CALL_FRAME_SLOT + ((int)(n))))
725
726
#define ZEND_CALL_ARG(call, n) \
727
6.26M
  ZEND_CALL_VAR_NUM(call, ((int)(n)) - 1)
728
729
33.0M
#define EX(element)       ((execute_data)->element)
730
731
399k
#define EX_CALL_INFO()      ZEND_CALL_INFO(execute_data)
732
#define EX_CALL_KIND()      ZEND_CALL_KIND(execute_data)
733
1.60M
#define EX_NUM_ARGS()     ZEND_CALL_NUM_ARGS(execute_data)
734
735
#define ZEND_CALL_USES_STRICT_TYPES(call) \
736
3.93M
  (((call)->func->common.fn_flags & ZEND_ACC_STRICT_TYPES) != 0)
737
738
#define EX_USES_STRICT_TYPES() \
739
1.85M
  ZEND_CALL_USES_STRICT_TYPES(execute_data)
740
741
#define ZEND_ARG_USES_STRICT_TYPES() \
742
25.9k
  (EG(current_execute_data)->prev_execute_data && \
743
12.8k
   EG(current_execute_data)->prev_execute_data->func && \
744
25.9k
   ZEND_CALL_USES_STRICT_TYPES(EG(current_execute_data)->prev_execute_data))
745
746
#define ZEND_FLF_ARG_USES_STRICT_TYPES() \
747
  (EG(current_execute_data) && \
748
   EG(current_execute_data)->func && \
749
   ZEND_CALL_USES_STRICT_TYPES(EG(current_execute_data)))
750
751
#define ZEND_RET_USES_STRICT_TYPES() \
752
384
  ZEND_CALL_USES_STRICT_TYPES(EG(current_execute_data))
753
754
17.1M
#define EX_VAR(n)       ZEND_CALL_VAR(execute_data, n)
755
381k
#define EX_VAR_NUM(n)     ZEND_CALL_VAR_NUM(execute_data, n)
756
757
83.4M
#define EX_VAR_TO_NUM(n)    ((uint32_t)((n) / sizeof(zval) - ZEND_CALL_FRAME_SLOT))
758
73.9M
#define EX_NUM_TO_VAR(n)    ((uint32_t)(((n) + ZEND_CALL_FRAME_SLOT) * sizeof(zval)))
759
760
#define ZEND_OPLINE_TO_OFFSET(opline, target) \
761
230k
  ((char*)(target) - (char*)(opline))
762
763
#define ZEND_OPLINE_NUM_TO_OFFSET(op_array, opline, opline_num) \
764
2.49M
  ((char*)&(op_array)->opcodes[opline_num] - (char*)(opline))
765
766
#define ZEND_OFFSET_TO_OPLINE(base, offset) \
767
507k
  ((zend_op*)(((char*)(base)) + (int)offset))
768
769
#define ZEND_OFFSET_TO_OPLINE_NUM(op_array, base, offset) \
770
20.8k
  (ZEND_OFFSET_TO_OPLINE(base, offset) - op_array->opcodes)
771
772
#if ZEND_USE_ABS_JMP_ADDR
773
774
/* run-time jump target */
775
# define OP_JMP_ADDR(opline, node) \
776
  (node).jmp_addr
777
778
# define ZEND_SET_OP_JMP_ADDR(opline, node, val) do { \
779
    (node).jmp_addr = (val); \
780
  } while (0)
781
782
/* convert jump target from compile-time to run-time */
783
# define ZEND_PASS_TWO_UPDATE_JMP_TARGET(op_array, opline, node) do { \
784
    (node).jmp_addr = (op_array)->opcodes + (node).opline_num; \
785
  } while (0)
786
787
/* convert jump target back from run-time to compile-time */
788
# define ZEND_PASS_TWO_UNDO_JMP_TARGET(op_array, opline, node) do { \
789
    (node).opline_num = (node).jmp_addr - (op_array)->opcodes; \
790
  } while (0)
791
792
#else
793
794
/* run-time jump target */
795
# define OP_JMP_ADDR(opline, node) \
796
486k
  ZEND_OFFSET_TO_OPLINE(opline, (node).jmp_offset)
797
798
214k
# define ZEND_SET_OP_JMP_ADDR(opline, node, val) do { \
799
214k
    (node).jmp_offset = ZEND_OPLINE_TO_OFFSET(opline, val); \
800
214k
  } while (0)
801
802
/* convert jump target from compile-time to run-time */
803
2.46M
# define ZEND_PASS_TWO_UPDATE_JMP_TARGET(op_array, opline, node) do { \
804
2.46M
    (node).jmp_offset = ZEND_OPLINE_NUM_TO_OFFSET(op_array, opline, (node).opline_num); \
805
2.46M
  } while (0)
806
807
/* convert jump target back from run-time to compile-time */
808
# define ZEND_PASS_TWO_UNDO_JMP_TARGET(op_array, opline, node) do { \
809
    (node).opline_num = ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, (node).jmp_offset); \
810
  } while (0)
811
812
#endif
813
814
/* constant-time constant */
815
# define CT_CONSTANT_EX(op_array, num) \
816
47.1M
  ((op_array)->literals + (num))
817
818
# define CT_CONSTANT(node) \
819
4.83k
  CT_CONSTANT_EX(CG(active_op_array), (node).constant)
820
821
#if ZEND_USE_ABS_CONST_ADDR
822
823
/* run-time constant */
824
# define RT_CONSTANT(opline, node) \
825
  (node).zv
826
827
/* convert constant from compile-time to run-time */
828
# define ZEND_PASS_TWO_UPDATE_CONSTANT(op_array, opline, node) do { \
829
    (node).zv = CT_CONSTANT_EX(op_array, (node).constant); \
830
  } while (0)
831
832
#else
833
834
/* At run-time, constants are allocated together with op_array->opcodes
835
 * and addressed relatively to current opline.
836
 */
837
838
/* run-time constant */
839
# define RT_CONSTANT(opline, node) \
840
4.96M
  ((zval*)(((char*)(opline)) + (int32_t)(node).constant))
841
842
/* convert constant from compile-time to run-time */
843
14.4M
# define ZEND_PASS_TWO_UPDATE_CONSTANT(op_array, opline, node) do { \
844
14.4M
    (node).constant = \
845
14.4M
      (((char*)CT_CONSTANT_EX(op_array, (node).constant)) - \
846
14.4M
      ((char*)opline)); \
847
14.4M
  } while (0)
848
849
#endif
850
851
/* convert constant back from run-time to compile-time */
852
980k
#define ZEND_PASS_TWO_UNDO_CONSTANT(op_array, opline, node) do { \
853
980k
    (node).constant = RT_CONSTANT(opline, node) - (op_array)->literals; \
854
980k
  } while (0)
855
856
#define RUN_TIME_CACHE(op_array) \
857
412k
  ZEND_MAP_PTR_GET((op_array)->run_time_cache)
858
859
#define ZEND_OP_ARRAY_EXTENSION(op_array, handle) \
860
0
  ((void**)RUN_TIME_CACHE(op_array))[handle]
861
862
168M
#define IS_UNUSED 0    /* Unused operand */
863
251M
#define IS_CONST  (1<<0)
864
440M
#define IS_TMP_VAR  (1<<1)
865
396M
#define IS_VAR    (1<<2)
866
60.3M
#define IS_CV   (1<<3)  /* Compiled variable */
867
868
/* Used for result.type of smart branch instructions */
869
1.41M
#define IS_SMART_BRANCH_JMPZ  (1<<4)
870
1.34M
#define IS_SMART_BRANCH_JMPNZ (1<<5)
871
872
35.9k
#define ZEND_EXTRA_VALUE 1
873
874
#include "zend_globals.h"
875
876
typedef enum _zend_compile_position {
877
  ZEND_COMPILE_POSITION_AT_SHEBANG = 0,
878
  ZEND_COMPILE_POSITION_AT_OPEN_TAG,
879
  ZEND_COMPILE_POSITION_AFTER_OPEN_TAG
880
} zend_compile_position;
881
882
BEGIN_EXTERN_C()
883
884
void init_compiler(void);
885
void shutdown_compiler(void);
886
void zend_init_compiler_data_structures(void);
887
888
void zend_oparray_context_begin(zend_oparray_context *prev_context, zend_op_array *op_array);
889
void zend_oparray_context_end(const zend_oparray_context *prev_context);
890
void zend_file_context_begin(zend_file_context *prev_context);
891
void zend_file_context_end(const zend_file_context *prev_context);
892
893
extern ZEND_API zend_op_array *(*zend_compile_file)(zend_file_handle *file_handle, int type);
894
extern ZEND_API zend_op_array *(*zend_compile_string)(zend_string *source_string, const char *filename, zend_compile_position position);
895
896
ZEND_API int ZEND_FASTCALL lex_scan(zval *zendlval, zend_parser_stack_elem *elem);
897
void startup_scanner(void);
898
void shutdown_scanner(void);
899
900
ZEND_API zend_string *zend_set_compiled_filename(zend_string *new_compiled_filename);
901
ZEND_API void zend_restore_compiled_filename(zend_string *original_compiled_filename);
902
ZEND_API zend_string *zend_get_compiled_filename(void);
903
ZEND_API uint32_t zend_get_compiled_lineno(void);
904
ZEND_API size_t zend_get_scanned_file_offset(void);
905
906
ZEND_API zend_string *zend_get_compiled_variable_name(const zend_op_array *op_array, uint32_t var);
907
908
#ifdef ZTS
909
const char *zend_get_zendtext(void);
910
#endif
911
912
typedef zend_result (ZEND_FASTCALL *unary_op_type)(zval *, zval *);
913
typedef zend_result (ZEND_FASTCALL *binary_op_type)(zval *, zval *, zval *);
914
915
ZEND_API unary_op_type get_unary_op(int opcode);
916
ZEND_API binary_op_type get_binary_op(int opcode);
917
918
void zend_stop_lexing(void);
919
void zend_emit_final_return(bool return_one);
920
921
typedef enum {
922
  ZEND_MODIFIER_TARGET_PROPERTY = 0,
923
  ZEND_MODIFIER_TARGET_METHOD,
924
  ZEND_MODIFIER_TARGET_CONSTANT,
925
  ZEND_MODIFIER_TARGET_CPP,
926
  ZEND_MODIFIER_TARGET_PROPERTY_HOOK,
927
} zend_modifier_target;
928
929
/* Used during AST construction */
930
zend_ast *zend_ast_append_str(zend_ast *left, zend_ast *right);
931
zend_ast *zend_negate_num_string(zend_ast *ast);
932
uint32_t zend_add_class_modifier(uint32_t flags, uint32_t new_flag);
933
uint32_t zend_add_anonymous_class_modifier(uint32_t flags, uint32_t new_flag);
934
uint32_t zend_add_member_modifier(uint32_t flags, uint32_t new_flag, zend_modifier_target target);
935
936
uint32_t zend_modifier_token_to_flag(zend_modifier_target target, uint32_t flags);
937
uint32_t zend_modifier_list_to_flags(zend_modifier_target target, zend_ast *modifiers);
938
939
bool zend_handle_encoding_declaration(zend_ast *ast);
940
941
ZEND_API zend_class_entry *zend_bind_class_in_slot(
942
    zval *class_table_slot, const zval *lcname, zend_string *lc_parent_name);
943
ZEND_API zend_result do_bind_function(zend_function *func, const zval *lcname);
944
ZEND_API zend_result do_bind_class(zval *lcname, zend_string *lc_parent_name);
945
946
void zend_resolve_goto_label(zend_op_array *op_array, zend_op *opline);
947
948
ZEND_API void function_add_ref(zend_function *function);
949
zend_string *zval_make_interned_string(zval *zv);
950
951
2.19M
#define INITIAL_OP_ARRAY_SIZE 64
952
953
954
/* helper functions in zend_language_scanner.l */
955
struct _zend_arena;
956
957
ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type);
958
ZEND_API zend_op_array *compile_string(zend_string *source_string, const char *filename, zend_compile_position position);
959
ZEND_API zend_op_array *compile_filename(int type, zend_string *filename);
960
ZEND_API zend_ast *zend_compile_string_to_ast(
961
    zend_string *code, struct _zend_arena **ast_arena, zend_string *filename);
962
ZEND_API zend_result zend_execute_scripts(int type, zval *retval, int file_count, ...);
963
ZEND_API zend_result zend_execute_script(int type, zval *retval, zend_file_handle *file_handle);
964
ZEND_API zend_result open_file_for_scanning(zend_file_handle *file_handle);
965
ZEND_API void init_op_array(zend_op_array *op_array, zend_function_type type, int initial_ops_size);
966
ZEND_API void destroy_op_array(zend_op_array *op_array);
967
ZEND_API void zend_destroy_static_vars(zend_op_array *op_array);
968
ZEND_API void zend_destroy_file_handle(zend_file_handle *file_handle);
969
ZEND_API void zend_cleanup_mutable_class_data(zend_class_entry *ce);
970
ZEND_API void zend_cleanup_internal_class_data(zend_class_entry *ce);
971
ZEND_API void zend_type_release(zend_type type, bool persistent);
972
ZEND_API zend_string *zend_create_member_string(const zend_string *class_name, const zend_string *member_name);
973
974
975
ZEND_API ZEND_COLD void zend_user_exception_handler(void);
976
977
#define zend_try_exception_handler() do { \
978
    if (UNEXPECTED(EG(exception))) { \
979
      if (Z_TYPE(EG(user_exception_handler)) != IS_UNDEF) { \
980
        zend_user_exception_handler(); \
981
      } \
982
    } \
983
  } while (0)
984
985
ZEND_API void zend_free_internal_arg_info(zend_internal_function *function,
986
    bool permanent);
987
ZEND_API void destroy_zend_function(zend_function *function);
988
ZEND_API void zend_function_dtor(zval *zv);
989
ZEND_API void destroy_zend_class(zval *zv);
990
void zend_class_add_ref(zval *zv);
991
992
ZEND_API zend_string *zend_mangle_property_name(const char *src1, size_t src1_length, const char *src2, size_t src2_length, bool internal);
993
#define zend_unmangle_property_name(mangled_property, class_name, prop_name) \
994
303k
        zend_unmangle_property_name_ex(mangled_property, class_name, prop_name, NULL)
995
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);
996
997
289k
static zend_always_inline const char *zend_get_unmangled_property_name(const zend_string *mangled_prop) {
998
289k
  const char *class_name, *prop_name;
999
289k
  zend_unmangle_property_name(mangled_prop, &class_name, &prop_name);
1000
289k
  return prop_name;
1001
289k
}
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
997
281k
static zend_always_inline const char *zend_get_unmangled_property_name(const zend_string *mangled_prop) {
998
281k
  const char *class_name, *prop_name;
999
  zend_unmangle_property_name(mangled_prop, &class_name, &prop_name);
1000
281k
  return prop_name;
1001
281k
}
var.c:zend_get_unmangled_property_name
Line
Count
Source
997
348
static zend_always_inline const char *zend_get_unmangled_property_name(const zend_string *mangled_prop) {
998
348
  const char *class_name, *prop_name;
999
  zend_unmangle_property_name(mangled_prop, &class_name, &prop_name);
1000
348
  return prop_name;
1001
348
}
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
997
4.83k
static zend_always_inline const char *zend_get_unmangled_property_name(const zend_string *mangled_prop) {
998
4.83k
  const char *class_name, *prop_name;
999
  zend_unmangle_property_name(mangled_prop, &class_name, &prop_name);
1000
4.83k
  return prop_name;
1001
4.83k
}
Unexecuted instantiation: zend_ast.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_attributes.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_autoload.c:zend_get_unmangled_property_name
zend_builtin_functions.c:zend_get_unmangled_property_name
Line
Count
Source
997
255
static zend_always_inline const char *zend_get_unmangled_property_name(const zend_string *mangled_prop) {
998
255
  const char *class_name, *prop_name;
999
  zend_unmangle_property_name(mangled_prop, &class_name, &prop_name);
1000
255
  return prop_name;
1001
255
}
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
997
609
static zend_always_inline const char *zend_get_unmangled_property_name(const zend_string *mangled_prop) {
998
609
  const char *class_name, *prop_name;
999
  zend_unmangle_property_name(mangled_prop, &class_name, &prop_name);
1000
609
  return prop_name;
1001
609
}
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
997
1.95k
static zend_always_inline const char *zend_get_unmangled_property_name(const zend_string *mangled_prop) {
998
1.95k
  const char *class_name, *prop_name;
999
  zend_unmangle_property_name(mangled_prop, &class_name, &prop_name);
1000
1.95k
  return prop_name;
1001
1.95k
}
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
997
213
static zend_always_inline const char *zend_get_unmangled_property_name(const zend_string *mangled_prop) {
998
213
  const char *class_name, *prop_name;
999
  zend_unmangle_property_name(mangled_prop, &class_name, &prop_name);
1000
213
  return prop_name;
1001
213
}
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
997
102
static zend_always_inline const char *zend_get_unmangled_property_name(const zend_string *mangled_prop) {
998
102
  const char *class_name, *prop_name;
999
  zend_unmangle_property_name(mangled_prop, &class_name, &prop_name);
1000
102
  return prop_name;
1001
102
}
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
1002
1003
4.77k
#define ZEND_FUNCTION_DTOR zend_function_dtor
1004
0
#define ZEND_CLASS_DTOR destroy_zend_class
1005
1006
typedef bool (*zend_needs_live_range_cb)(const zend_op_array *op_array, const zend_op *opline);
1007
ZEND_API void zend_recalc_live_ranges(
1008
  zend_op_array *op_array, zend_needs_live_range_cb needs_live_range);
1009
1010
ZEND_API void pass_two(zend_op_array *op_array);
1011
ZEND_API bool zend_is_compiling(void);
1012
ZEND_API char *zend_make_compiled_string_description(const char *name);
1013
ZEND_API void zend_initialize_class_data(zend_class_entry *ce, bool nullify_handlers);
1014
uint32_t zend_get_class_fetch_type(const zend_string *name);
1015
ZEND_API uint8_t zend_get_call_op(const zend_op *init_op, const zend_function *fbc, bool result_used);
1016
ZEND_API bool zend_is_smart_branch(const zend_op *opline);
1017
1018
typedef bool (*zend_auto_global_callback)(zend_string *name);
1019
typedef struct _zend_auto_global {
1020
  zend_string *name;
1021
  zend_auto_global_callback auto_global_callback;
1022
  bool jit;
1023
  bool armed;
1024
} zend_auto_global;
1025
1026
ZEND_API zend_result zend_register_auto_global(zend_string *name, bool jit, zend_auto_global_callback auto_global_callback);
1027
ZEND_API void zend_activate_auto_globals(void);
1028
ZEND_API bool zend_is_auto_global(zend_string *name);
1029
ZEND_API bool zend_is_auto_global_str(const char *name, size_t len);
1030
ZEND_API size_t zend_dirname(char *path, size_t len);
1031
ZEND_API void zend_set_function_arg_flags(zend_function *func);
1032
1033
int ZEND_FASTCALL zendlex(zend_parser_stack_elem *elem);
1034
1035
void zend_assert_valid_class_name(const zend_string *const_name, const char *type);
1036
1037
zend_string *zend_type_to_string_resolved(zend_type type, const zend_class_entry *scope);
1038
ZEND_API zend_string *zend_type_to_string(zend_type type);
1039
1040
/* class fetches */
1041
5.61M
#define ZEND_FETCH_CLASS_DEFAULT  0
1042
85.5k
#define ZEND_FETCH_CLASS_SELF   1
1043
51.9k
#define ZEND_FETCH_CLASS_PARENT   2
1044
11.4k
#define ZEND_FETCH_CLASS_STATIC   3
1045
308
#define ZEND_FETCH_CLASS_AUTO   4
1046
5.70k
#define ZEND_FETCH_CLASS_INTERFACE  5
1047
3.08k
#define ZEND_FETCH_CLASS_TRAIT    6
1048
32.1k
#define ZEND_FETCH_CLASS_MASK        0x0f
1049
866k
#define ZEND_FETCH_CLASS_NO_AUTOLOAD 0x80
1050
262k
#define ZEND_FETCH_CLASS_SILENT      0x0100
1051
433k
#define ZEND_FETCH_CLASS_EXCEPTION   0x0200
1052
218k
#define ZEND_FETCH_CLASS_ALLOW_UNLINKED 0x0400
1053
6.43k
#define ZEND_FETCH_CLASS_ALLOW_NEARLY_LINKED 0x0800
1054
1055
/* These should not clash with ZEND_ACC_PPP_MASK and ZEND_ACC_PPP_SET_MASK */
1056
1.88M
#define ZEND_PARAM_REF      (1<<3)
1057
1.88M
#define ZEND_PARAM_VARIADIC (1<<4)
1058
1059
12.8M
#define ZEND_NAME_FQ       0
1060
1.37M
#define ZEND_NAME_NOT_FQ   1
1061
24.5M
#define ZEND_NAME_RELATIVE 2
1062
1063
/* ZEND_FETCH_ flags in class name AST of new const expression must not clash with ZEND_NAME_ flags */
1064
1.50k
#define ZEND_CONST_EXPR_NEW_FETCH_TYPE_SHIFT 2
1065
1066
308k
#define ZEND_TYPE_NULLABLE (1<<8)
1067
1068
2.02M
#define ZEND_ARRAY_SYNTAX_LIST 1  /* list() */
1069
6.82k
#define ZEND_ARRAY_SYNTAX_LONG 2  /* array() */
1070
91.4k
#define ZEND_ARRAY_SYNTAX_SHORT 3 /* [] */
1071
1072
/* var status for backpatching */
1073
20.1M
#define BP_VAR_R      0
1074
3.43M
#define BP_VAR_W      1
1075
2.61M
#define BP_VAR_RW     2
1076
31.8M
#define BP_VAR_IS     3
1077
779k
#define BP_VAR_FUNC_ARG   4
1078
1.27M
#define BP_VAR_UNSET    5
1079
1080
19.3M
#define ZEND_USER_CODE(type)    ((type) != ZEND_INTERNAL_FUNCTION)
1081
1082
5.35k
#define ZEND_EVAL       (1<<0)
1083
1.82k
#define ZEND_INCLUDE      (1<<1)
1084
176k
#define ZEND_INCLUDE_ONCE   (1<<2)
1085
1.15M
#define ZEND_REQUIRE      (1<<3)
1086
90.4k
#define ZEND_REQUIRE_ONCE   (1<<4)
1087
1088
/* global/local fetches */
1089
27.7k
#define ZEND_FETCH_GLOBAL   (1<<1)
1090
175k
#define ZEND_FETCH_LOCAL    (1<<2)
1091
64.8k
#define ZEND_FETCH_GLOBAL_LOCK  (1<<3)
1092
1093
#define ZEND_FETCH_TYPE_MASK  0xe
1094
1095
/* Only one of these can ever be in use */
1096
8.52k
#define ZEND_FETCH_REF      1
1097
7.08k
#define ZEND_FETCH_DIM_WRITE  2
1098
99.5k
#define ZEND_FETCH_OBJ_FLAGS  3
1099
1100
/* Used to mark what kind of operation a writing FETCH_DIM is used in,
1101
 * to produce a more precise error on incorrect string offset use. */
1102
12.1k
#define ZEND_FETCH_DIM_REF 1
1103
52.1k
#define ZEND_FETCH_DIM_DIM 2
1104
1.19k
#define ZEND_FETCH_DIM_OBJ 3
1105
271
#define ZEND_FETCH_DIM_INCDEC 4
1106
1107
12.0k
#define ZEND_ISEMPTY      (1<<0)
1108
1109
270k
#define ZEND_LAST_CATCH     (1<<0)
1110
1111
637k
#define ZEND_FREE_ON_RETURN     (1<<0)
1112
48.0k
#define ZEND_FREE_SWITCH        (1<<1)
1113
51.0k
#define ZEND_FREE_VOID_CAST     (1<<2)
1114
1115
0
#define ZEND_SEND_BY_VAL     0u
1116
2.33M
#define ZEND_SEND_BY_REF     1u
1117
2.17M
#define ZEND_SEND_PREFER_REF 2u
1118
1119
10.1k
#define ZEND_THROW_IS_EXPR 1u
1120
1121
17.1k
#define ZEND_FCALL_MAY_HAVE_EXTRA_NAMED_PARAMS 1
1122
1123
/* The send mode, the is_variadic, the is_promoted, and the is_tentative flags are stored as part of zend_type */
1124
1.04M
#define _ZEND_SEND_MODE_SHIFT _ZEND_TYPE_EXTRA_FLAGS_SHIFT
1125
33.8k
#define _ZEND_IS_VARIADIC_BIT (1 << (_ZEND_TYPE_EXTRA_FLAGS_SHIFT + 2))
1126
985
#define _ZEND_IS_PROMOTED_BIT (1 << (_ZEND_TYPE_EXTRA_FLAGS_SHIFT + 3))
1127
2.25k
#define _ZEND_IS_TENTATIVE_BIT (1 << (_ZEND_TYPE_EXTRA_FLAGS_SHIFT + 4))
1128
#define ZEND_ARG_SEND_MODE(arg_info) \
1129
89.9k
  ((ZEND_TYPE_FULL_MASK((arg_info)->type) >> _ZEND_SEND_MODE_SHIFT) & 3)
1130
#define ZEND_ARG_IS_VARIADIC(arg_info) \
1131
32.9k
  ((ZEND_TYPE_FULL_MASK((arg_info)->type) & _ZEND_IS_VARIADIC_BIT) != 0)
1132
#define ZEND_ARG_IS_PROMOTED(arg_info) \
1133
  ((ZEND_TYPE_FULL_MASK((arg_info)->type) & _ZEND_IS_PROMOTED_BIT) != 0)
1134
#define ZEND_ARG_TYPE_IS_TENTATIVE(arg_info) \
1135
2.25k
  ((ZEND_TYPE_FULL_MASK((arg_info)->type) & _ZEND_IS_TENTATIVE_BIT) != 0)
1136
1137
912k
#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. */
1138
14.1k
#define ZEND_ALT_CASE_SYNTAX    (1 << 1) /* deprecated switch case terminated by semicolon */
1139
1140
/* Attributes for ${} encaps var in strings (ZEND_AST_DIM or ZEND_AST_VAR node) */
1141
/* ZEND_AST_VAR nodes can have any of the ZEND_ENCAPS_VAR_* flags */
1142
/* ZEND_AST_DIM flags can have ZEND_ENCAPS_VAR_DOLLAR_CURLY during the parse phase. */
1143
460k
#define ZEND_ENCAPS_VAR_DOLLAR_CURLY (1 << 0)
1144
460k
#define ZEND_ENCAPS_VAR_DOLLAR_CURLY_VAR_VAR (1 << 1)
1145
1146
/* Make sure these don't clash with ZEND_FETCH_CLASS_* flags. */
1147
#define IS_CONSTANT_CLASS                    0x400 /* __CLASS__ in trait */
1148
6.05M
#define IS_CONSTANT_UNQUALIFIED_IN_NAMESPACE 0x800
1149
1150
static zend_always_inline bool zend_check_arg_send_type(const zend_function *zf, uint32_t arg_num, uint32_t mask)
1151
2.33M
{
1152
2.33M
  arg_num--;
1153
2.33M
  if (UNEXPECTED(arg_num >= zf->common.num_args)) {
1154
1.34M
    if (EXPECTED((zf->common.fn_flags & ZEND_ACC_VARIADIC) == 0)) {
1155
1.12M
      return 0;
1156
1.12M
    }
1157
221k
    arg_num = zf->common.num_args;
1158
221k
  }
1159
1.21M
  return UNEXPECTED((ZEND_ARG_SEND_MODE(&zf->common.arg_info[arg_num]) & mask) != 0);
1160
2.33M
}
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
1151
1.91k
{
1152
1.91k
  arg_num--;
1153
1.91k
  if (UNEXPECTED(arg_num >= zf->common.num_args)) {
1154
45
    if (EXPECTED((zf->common.fn_flags & ZEND_ACC_VARIADIC) == 0)) {
1155
37
      return 0;
1156
37
    }
1157
8
    arg_num = zf->common.num_args;
1158
8
  }
1159
1.88k
  return UNEXPECTED((ZEND_ARG_SEND_MODE(&zf->common.arg_info[arg_num]) & mask) != 0);
1160
1.91k
}
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_autoload.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
1151
278k
{
1152
278k
  arg_num--;
1153
278k
  if (UNEXPECTED(arg_num >= zf->common.num_args)) {
1154
30.3k
    if (EXPECTED((zf->common.fn_flags & ZEND_ACC_VARIADIC) == 0)) {
1155
23.6k
      return 0;
1156
23.6k
    }
1157
6.66k
    arg_num = zf->common.num_args;
1158
6.66k
  }
1159
254k
  return UNEXPECTED((ZEND_ARG_SEND_MODE(&zf->common.arg_info[arg_num]) & mask) != 0);
1160
278k
}
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
1151
758k
{
1152
758k
  arg_num--;
1153
758k
  if (UNEXPECTED(arg_num >= zf->common.num_args)) {
1154
15.2k
    if (EXPECTED((zf->common.fn_flags & ZEND_ACC_VARIADIC) == 0)) {
1155
13.0k
      return 0;
1156
13.0k
    }
1157
2.23k
    arg_num = zf->common.num_args;
1158
2.23k
  }
1159
745k
  return UNEXPECTED((ZEND_ARG_SEND_MODE(&zf->common.arg_info[arg_num]) & mask) != 0);
1160
758k
}
zend_execute.c:zend_check_arg_send_type
Line
Count
Source
1151
1.29M
{
1152
1.29M
  arg_num--;
1153
1.29M
  if (UNEXPECTED(arg_num >= zf->common.num_args)) {
1154
1.29M
    if (EXPECTED((zf->common.fn_flags & ZEND_ACC_VARIADIC) == 0)) {
1155
1.08M
      return 0;
1156
1.08M
    }
1157
212k
    arg_num = zf->common.num_args;
1158
212k
  }
1159
215k
  return UNEXPECTED((ZEND_ARG_SEND_MODE(&zf->common.arg_info[arg_num]) & mask) != 0);
1160
1.29M
}
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
1161
1162
#define ARG_MUST_BE_SENT_BY_REF(zf, arg_num) \
1163
161k
  zend_check_arg_send_type(zf, arg_num, ZEND_SEND_BY_REF)
1164
1165
#define ARG_SHOULD_BE_SENT_BY_REF(zf, arg_num) \
1166
2.17M
  zend_check_arg_send_type(zf, arg_num, ZEND_SEND_BY_REF|ZEND_SEND_PREFER_REF)
1167
1168
#define ARG_MAY_BE_SENT_BY_REF(zf, arg_num) \
1169
476
  zend_check_arg_send_type(zf, arg_num, ZEND_SEND_PREFER_REF)
1170
1171
/* Quick API to check first 12 arguments */
1172
3.34M
#define MAX_ARG_FLAG_NUM 12
1173
1174
#ifdef WORDS_BIGENDIAN
1175
# define ZEND_SET_ARG_FLAG(zf, arg_num, mask) do { \
1176
    (zf)->quick_arg_flags |= ((mask) << ((arg_num) - 1) * 2); \
1177
  } while (0)
1178
# define ZEND_CHECK_ARG_FLAG(zf, arg_num, mask) \
1179
  (((zf)->quick_arg_flags >> (((arg_num) - 1) * 2)) & (mask))
1180
#else
1181
968k
# define ZEND_SET_ARG_FLAG(zf, arg_num, mask) do { \
1182
968k
    (zf)->quick_arg_flags |= (((mask) << 6) << (arg_num) * 2); \
1183
968k
  } while (0)
1184
# define ZEND_CHECK_ARG_FLAG(zf, arg_num, mask) \
1185
32.1k
  (((zf)->quick_arg_flags >> (((arg_num) + 3) * 2)) & (mask))
1186
#endif
1187
1188
#define QUICK_ARG_MUST_BE_SENT_BY_REF(zf, arg_num) \
1189
14.3k
  ZEND_CHECK_ARG_FLAG(zf, arg_num, ZEND_SEND_BY_REF)
1190
1191
#define QUICK_ARG_SHOULD_BE_SENT_BY_REF(zf, arg_num) \
1192
17.7k
  ZEND_CHECK_ARG_FLAG(zf, arg_num, ZEND_SEND_BY_REF|ZEND_SEND_PREFER_REF)
1193
1194
#define QUICK_ARG_MAY_BE_SENT_BY_REF(zf, arg_num) \
1195
  ZEND_CHECK_ARG_FLAG(zf, arg_num, ZEND_SEND_PREFER_REF)
1196
1197
#define ZEND_RETURN_VAL 0
1198
#define ZEND_RETURN_REF 1
1199
1200
#define ZEND_BIND_VAL      0
1201
71.5k
#define ZEND_BIND_REF      1
1202
106k
#define ZEND_BIND_IMPLICIT 2
1203
12.3k
#define ZEND_BIND_EXPLICIT 4
1204
1205
31.6k
#define ZEND_RETURNS_FUNCTION (1<<0)
1206
2.28k
#define ZEND_RETURNS_VALUE    (1<<1)
1207
1208
77.1k
#define ZEND_ARRAY_ELEMENT_REF    (1<<0)
1209
9.74k
#define ZEND_ARRAY_NOT_PACKED   (1<<1)
1210
42.4k
#define ZEND_ARRAY_SIZE_SHIFT   2
1211
1212
/* Attribute for ternary inside parentheses */
1213
1.78k
#define ZEND_PARENTHESIZED_CONDITIONAL 1
1214
1215
/* Used to distinguish (parent::$prop)::get() from parent hook call. */
1216
1.65k
#define ZEND_PARENTHESIZED_STATIC_PROP 1
1217
1218
/* Used to disallow pipes with arrow functions that lead to confusing parse trees. */
1219
23.4k
#define ZEND_PARENTHESIZED_ARROW_FUNC 1
1220
1221
/* For "use" AST nodes and the seen symbol table */
1222
178k
#define ZEND_SYMBOL_CLASS    (1<<0)
1223
949k
#define ZEND_SYMBOL_FUNCTION (1<<1)
1224
7.60k
#define ZEND_SYMBOL_CONST    (1<<2)
1225
1226
/* All increment opcodes are even (decrement are odd) */
1227
3.63k
#define ZEND_IS_INCREMENT(opcode) (((opcode) & 1) == 0)
1228
1229
#define ZEND_IS_BINARY_ASSIGN_OP_OPCODE(opcode) \
1230
  (((opcode) >= ZEND_ADD) && ((opcode) <= ZEND_POW))
1231
1232
/* PFAs/FCCs */
1233
8.47k
#define ZEND_PLACEHOLDER_VARIADIC (1<<0)
1234
1235
/* Pseudo-opcodes that are used only temporarily during compilation */
1236
2.59k
#define ZEND_GOTO  253
1237
3.33k
#define ZEND_BRK   254
1238
4.19k
#define ZEND_CONT  255
1239
1240
1241
END_EXTERN_C()
1242
1243
#define ZEND_CLONE_FUNC_NAME    "__clone"
1244
#define ZEND_CONSTRUCTOR_FUNC_NAME  "__construct"
1245
#define ZEND_DESTRUCTOR_FUNC_NAME "__destruct"
1246
#define ZEND_GET_FUNC_NAME          "__get"
1247
#define ZEND_SET_FUNC_NAME          "__set"
1248
#define ZEND_UNSET_FUNC_NAME        "__unset"
1249
#define ZEND_ISSET_FUNC_NAME        "__isset"
1250
#define ZEND_CALL_FUNC_NAME         "__call"
1251
#define ZEND_CALLSTATIC_FUNC_NAME   "__callstatic"
1252
#define ZEND_TOSTRING_FUNC_NAME     "__tostring"
1253
81
#define ZEND_INVOKE_FUNC_NAME       "__invoke"
1254
15
#define ZEND_DEBUGINFO_FUNC_NAME    "__debuginfo"
1255
1256
/* The following constants may be combined in CG(compiler_options)
1257
 * to change the default compiler behavior */
1258
1259
/* generate extended debug information */
1260
7.89M
#define ZEND_COMPILE_EXTENDED_STMT              (1<<0)
1261
5.29M
#define ZEND_COMPILE_EXTENDED_FCALL             (1<<1)
1262
#define ZEND_COMPILE_EXTENDED_INFO              (ZEND_COMPILE_EXTENDED_STMT|ZEND_COMPILE_EXTENDED_FCALL)
1263
1264
/* call op_array handler of extensions */
1265
1.14M
#define ZEND_COMPILE_HANDLE_OP_ARRAY            (1<<2)
1266
1267
/* generate ZEND_INIT_FCALL_BY_NAME for internal functions instead of ZEND_INIT_FCALL */
1268
336k
#define ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS  (1<<3)
1269
1270
/* don't perform early binding for classes inherited form internal ones;
1271
 * in namespaces assume that internal class that doesn't exist at compile-time
1272
 * may appear in run-time */
1273
40.4k
#define ZEND_COMPILE_IGNORE_INTERNAL_CLASSES    (1<<4)
1274
1275
/* generate ZEND_DECLARE_CLASS_DELAYED opcode to delay early binding */
1276
71.3k
#define ZEND_COMPILE_DELAYED_BINDING            (1<<5)
1277
1278
/* disable constant substitution at compile-time */
1279
168k
#define ZEND_COMPILE_NO_CONSTANT_SUBSTITUTION   (1<<6)
1280
1281
/* disable substitution of persistent constants at compile-time */
1282
16.5k
#define ZEND_COMPILE_NO_PERSISTENT_CONSTANT_SUBSTITUTION  (1<<8)
1283
1284
/* generate ZEND_INIT_FCALL_BY_NAME for userland functions instead of ZEND_INIT_FCALL */
1285
65.7k
#define ZEND_COMPILE_IGNORE_USER_FUNCTIONS      (1<<9)
1286
1287
/* force ZEND_ACC_USE_GUARDS for all classes */
1288
174k
#define ZEND_COMPILE_GUARDS           (1<<10)
1289
1290
/* disable builtin special case function calls */
1291
157k
#define ZEND_COMPILE_NO_BUILTINS        (1<<11)
1292
1293
/* result of compilation may be stored in file cache */
1294
0
#define ZEND_COMPILE_WITH_FILE_CACHE      (1<<12)
1295
1296
/* ignore functions and classes declared in other files */
1297
110k
#define ZEND_COMPILE_IGNORE_OTHER_FILES     (1<<13)
1298
1299
/* this flag is set when compiler invoked by opcache_compile_file() */
1300
86.6k
#define ZEND_COMPILE_WITHOUT_EXECUTION          (1<<14)
1301
1302
/* this flag is set when compiler invoked during preloading */
1303
1.40M
#define ZEND_COMPILE_PRELOAD                    (1<<15)
1304
1305
/* disable jumptable optimization for switch statements */
1306
2.53k
#define ZEND_COMPILE_NO_JUMPTABLES        (1<<16)
1307
1308
/* this flag is set when compiler invoked during preloading in separate process */
1309
0
#define ZEND_COMPILE_PRELOAD_IN_CHILD           (1<<17)
1310
1311
/* ignore observer notifications, e.g. to manually notify afterwards in a post-processing step after compilation */
1312
58.5k
#define ZEND_COMPILE_IGNORE_OBSERVER      (1<<18)
1313
1314
/* The default value for CG(compiler_options) */
1315
16
#define ZEND_COMPILE_DEFAULT          ZEND_COMPILE_HANDLE_OP_ARRAY
1316
1317
/* The default value for CG(compiler_options) during eval() */
1318
0
#define ZEND_COMPILE_DEFAULT_FOR_EVAL     0
1319
1320
ZEND_API bool zend_is_op_long_compatible(const zval *op);
1321
ZEND_API bool zend_binary_op_produces_error(uint32_t opcode, const zval *op1, const zval *op2);
1322
ZEND_API bool zend_unary_op_produces_error(uint32_t opcode, const zval *op);
1323
1324
bool zend_try_ct_eval_cast(zval *result, uint32_t type, zval *op1);
1325
1326
bool zend_op_may_elide_result(uint8_t opcode);
1327
1328
#endif /* ZEND_COMPILE_H */