Coverage Report

Created: 2025-09-27 06:26

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
115M
#define SET_UNUSED(op) do { \
37
115M
  op ## _type = IS_UNUSED; \
38
115M
  op.num = (uint32_t) -1; \
39
115M
} while (0)
40
41
38.1M
#define MAKE_NOP(opline) do { \
42
38.1M
  (opline)->opcode = ZEND_NOP; \
43
38.1M
  SET_UNUSED((opline)->op1); \
44
38.1M
  SET_UNUSED((opline)->op2); \
45
38.1M
  SET_UNUSED((opline)->result); \
46
38.1M
} while (0)
47
48
1.19M
#define RESET_DOC_COMMENT() do { \
49
1.19M
  if (CG(doc_comment)) { \
50
7.28k
    zend_string_release_ex(CG(doc_comment), 0); \
51
7.28k
    CG(doc_comment) = NULL; \
52
7.28k
  } \
53
1.19M
} 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
490k
# 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
153k
static zend_always_inline znode *zend_ast_get_znode(zend_ast *ast) {
103
153k
  return &((zend_ast_znode *) ast)->node;
104
153k
}
Unexecuted instantiation: php_date.c:zend_ast_get_znode
Unexecuted instantiation: php_pcre.c:zend_ast_get_znode
Unexecuted instantiation: exif.c:zend_ast_get_znode
Unexecuted instantiation: hash_adler32.c:zend_ast_get_znode
Unexecuted instantiation: hash_crc32.c:zend_ast_get_znode
Unexecuted instantiation: hash_fnv.c:zend_ast_get_znode
Unexecuted instantiation: hash_gost.c:zend_ast_get_znode
Unexecuted instantiation: hash_haval.c:zend_ast_get_znode
Unexecuted instantiation: hash_joaat.c:zend_ast_get_znode
Unexecuted instantiation: hash_md.c:zend_ast_get_znode
Unexecuted instantiation: hash_murmur.c:zend_ast_get_znode
Unexecuted instantiation: hash_ripemd.c:zend_ast_get_znode
Unexecuted instantiation: hash_sha_ni.c:zend_ast_get_znode
Unexecuted instantiation: hash_sha_sse2.c:zend_ast_get_znode
Unexecuted instantiation: hash_sha.c:zend_ast_get_znode
Unexecuted instantiation: hash_sha3.c:zend_ast_get_znode
Unexecuted instantiation: hash_snefru.c:zend_ast_get_znode
Unexecuted instantiation: hash_tiger.c:zend_ast_get_znode
Unexecuted instantiation: hash_whirlpool.c:zend_ast_get_znode
Unexecuted instantiation: hash_xxhash.c:zend_ast_get_znode
Unexecuted instantiation: hash.c:zend_ast_get_znode
Unexecuted instantiation: json_encoder.c:zend_ast_get_znode
Unexecuted instantiation: json_parser.tab.c:zend_ast_get_znode
Unexecuted instantiation: json_scanner.c:zend_ast_get_znode
Unexecuted instantiation: json.c:zend_ast_get_znode
Unexecuted instantiation: php_lexbor.c:zend_ast_get_znode
Unexecuted instantiation: shared_alloc_mmap.c:zend_ast_get_znode
Unexecuted instantiation: shared_alloc_posix.c:zend_ast_get_znode
Unexecuted instantiation: shared_alloc_shm.c:zend_ast_get_znode
Unexecuted instantiation: zend_accelerator_api.c:zend_ast_get_znode
Unexecuted instantiation: zend_accelerator_blacklist.c:zend_ast_get_znode
Unexecuted instantiation: zend_accelerator_debug.c:zend_ast_get_znode
Unexecuted instantiation: zend_accelerator_hash.c:zend_ast_get_znode
Unexecuted instantiation: zend_accelerator_module.c:zend_ast_get_znode
Unexecuted instantiation: zend_accelerator_util_funcs.c:zend_ast_get_znode
Unexecuted instantiation: zend_file_cache.c:zend_ast_get_znode
Unexecuted instantiation: zend_persist_calc.c:zend_ast_get_znode
Unexecuted instantiation: zend_persist.c:zend_ast_get_znode
Unexecuted instantiation: zend_shared_alloc.c:zend_ast_get_znode
Unexecuted instantiation: ZendAccelerator.c:zend_ast_get_znode
Unexecuted instantiation: zend_jit_vm_helpers.c:zend_ast_get_znode
Unexecuted instantiation: zend_jit.c:zend_ast_get_znode
Unexecuted instantiation: csprng.c:zend_ast_get_znode
Unexecuted instantiation: engine_mt19937.c:zend_ast_get_znode
Unexecuted instantiation: engine_pcgoneseq128xslrr64.c:zend_ast_get_znode
Unexecuted instantiation: engine_secure.c:zend_ast_get_znode
Unexecuted instantiation: engine_user.c:zend_ast_get_znode
Unexecuted instantiation: engine_xoshiro256starstar.c:zend_ast_get_znode
Unexecuted instantiation: gammasection.c:zend_ast_get_znode
Unexecuted instantiation: random.c:zend_ast_get_znode
Unexecuted instantiation: randomizer.c:zend_ast_get_znode
Unexecuted instantiation: zend_utils.c:zend_ast_get_znode
Unexecuted instantiation: php_reflection.c:zend_ast_get_znode
Unexecuted instantiation: php_spl.c:zend_ast_get_znode
Unexecuted instantiation: spl_array.c:zend_ast_get_znode
Unexecuted instantiation: spl_directory.c:zend_ast_get_znode
Unexecuted instantiation: spl_dllist.c:zend_ast_get_znode
Unexecuted instantiation: spl_exceptions.c:zend_ast_get_znode
Unexecuted instantiation: spl_fixedarray.c:zend_ast_get_znode
Unexecuted instantiation: spl_functions.c:zend_ast_get_znode
Unexecuted instantiation: spl_heap.c:zend_ast_get_znode
Unexecuted instantiation: spl_iterators.c:zend_ast_get_znode
Unexecuted instantiation: spl_observer.c:zend_ast_get_znode
Unexecuted instantiation: array.c:zend_ast_get_znode
Unexecuted instantiation: assert.c:zend_ast_get_znode
Unexecuted instantiation: base64.c:zend_ast_get_znode
Unexecuted instantiation: basic_functions.c:zend_ast_get_znode
Unexecuted instantiation: browscap.c:zend_ast_get_znode
Unexecuted instantiation: crc32_x86.c:zend_ast_get_znode
Unexecuted instantiation: crc32.c:zend_ast_get_znode
Unexecuted instantiation: credits.c:zend_ast_get_znode
Unexecuted instantiation: crypt.c:zend_ast_get_znode
Unexecuted instantiation: css.c:zend_ast_get_znode
Unexecuted instantiation: datetime.c:zend_ast_get_znode
Unexecuted instantiation: dir.c:zend_ast_get_znode
Unexecuted instantiation: dl.c:zend_ast_get_znode
Unexecuted instantiation: dns.c:zend_ast_get_znode
Unexecuted instantiation: exec.c:zend_ast_get_znode
Unexecuted instantiation: file.c:zend_ast_get_znode
Unexecuted instantiation: filestat.c:zend_ast_get_znode
Unexecuted instantiation: filters.c:zend_ast_get_znode
Unexecuted instantiation: flock_compat.c:zend_ast_get_znode
Unexecuted instantiation: formatted_print.c:zend_ast_get_znode
Unexecuted instantiation: fsock.c:zend_ast_get_znode
Unexecuted instantiation: ftok.c:zend_ast_get_znode
Unexecuted instantiation: ftp_fopen_wrapper.c:zend_ast_get_znode
Unexecuted instantiation: head.c:zend_ast_get_znode
Unexecuted instantiation: hrtime.c:zend_ast_get_znode
Unexecuted instantiation: html.c:zend_ast_get_znode
Unexecuted instantiation: http_fopen_wrapper.c:zend_ast_get_znode
Unexecuted instantiation: http.c:zend_ast_get_znode
Unexecuted instantiation: image.c:zend_ast_get_znode
Unexecuted instantiation: incomplete_class.c:zend_ast_get_znode
Unexecuted instantiation: info.c:zend_ast_get_znode
Unexecuted instantiation: iptc.c:zend_ast_get_znode
Unexecuted instantiation: levenshtein.c:zend_ast_get_znode
Unexecuted instantiation: link.c:zend_ast_get_znode
Unexecuted instantiation: mail.c:zend_ast_get_znode
Unexecuted instantiation: math.c:zend_ast_get_znode
Unexecuted instantiation: md5.c:zend_ast_get_znode
Unexecuted instantiation: metaphone.c:zend_ast_get_znode
Unexecuted instantiation: microtime.c:zend_ast_get_znode
Unexecuted instantiation: net.c:zend_ast_get_znode
Unexecuted instantiation: pack.c:zend_ast_get_znode
Unexecuted instantiation: pageinfo.c:zend_ast_get_znode
Unexecuted instantiation: password.c:zend_ast_get_znode
Unexecuted instantiation: php_fopen_wrapper.c:zend_ast_get_znode
Unexecuted instantiation: proc_open.c:zend_ast_get_znode
Unexecuted instantiation: quot_print.c:zend_ast_get_znode
Unexecuted instantiation: scanf.c:zend_ast_get_znode
Unexecuted instantiation: sha1.c:zend_ast_get_znode
Unexecuted instantiation: soundex.c:zend_ast_get_znode
Unexecuted instantiation: streamsfuncs.c:zend_ast_get_znode
Unexecuted instantiation: string.c:zend_ast_get_znode
Unexecuted instantiation: strnatcmp.c:zend_ast_get_znode
Unexecuted instantiation: syslog.c:zend_ast_get_znode
Unexecuted instantiation: type.c:zend_ast_get_znode
Unexecuted instantiation: uniqid.c:zend_ast_get_znode
Unexecuted instantiation: url_scanner_ex.c:zend_ast_get_znode
Unexecuted instantiation: url.c:zend_ast_get_znode
Unexecuted instantiation: user_filters.c:zend_ast_get_znode
Unexecuted instantiation: uuencode.c:zend_ast_get_znode
Unexecuted instantiation: var_unserializer.c:zend_ast_get_znode
Unexecuted instantiation: var.c:zend_ast_get_znode
Unexecuted instantiation: versioning.c:zend_ast_get_znode
Unexecuted instantiation: crypt_sha256.c:zend_ast_get_znode
Unexecuted instantiation: crypt_sha512.c:zend_ast_get_znode
Unexecuted instantiation: php_crypt_r.c:zend_ast_get_znode
Unexecuted instantiation: php_uri.c:zend_ast_get_znode
Unexecuted instantiation: php_uri_common.c:zend_ast_get_znode
Unexecuted instantiation: uri_parser_rfc3986.c:zend_ast_get_znode
Unexecuted instantiation: uri_parser_whatwg.c:zend_ast_get_znode
Unexecuted instantiation: uri_parser_php_parse_url.c:zend_ast_get_znode
Unexecuted instantiation: explicit_bzero.c:zend_ast_get_znode
Unexecuted instantiation: fopen_wrappers.c:zend_ast_get_znode
Unexecuted instantiation: getopt.c:zend_ast_get_znode
Unexecuted instantiation: main.c:zend_ast_get_znode
Unexecuted instantiation: network.c:zend_ast_get_znode
Unexecuted instantiation: output.c:zend_ast_get_znode
Unexecuted instantiation: php_content_types.c:zend_ast_get_znode
Unexecuted instantiation: php_ini_builder.c:zend_ast_get_znode
Unexecuted instantiation: php_ini.c:zend_ast_get_znode
Unexecuted instantiation: php_glob.c:zend_ast_get_znode
Unexecuted instantiation: php_odbc_utils.c:zend_ast_get_znode
Unexecuted instantiation: php_open_temporary_file.c:zend_ast_get_znode
Unexecuted instantiation: php_scandir.c:zend_ast_get_znode
Unexecuted instantiation: php_syslog.c:zend_ast_get_znode
Unexecuted instantiation: php_ticks.c:zend_ast_get_znode
Unexecuted instantiation: php_variables.c:zend_ast_get_znode
Unexecuted instantiation: reentrancy.c:zend_ast_get_znode
Unexecuted instantiation: rfc1867.c:zend_ast_get_znode
Unexecuted instantiation: safe_bcmp.c:zend_ast_get_znode
Unexecuted instantiation: SAPI.c:zend_ast_get_znode
Unexecuted instantiation: snprintf.c:zend_ast_get_znode
Unexecuted instantiation: spprintf.c:zend_ast_get_znode
Unexecuted instantiation: strlcat.c:zend_ast_get_znode
Unexecuted instantiation: strlcpy.c:zend_ast_get_znode
Unexecuted instantiation: cast.c:zend_ast_get_znode
Unexecuted instantiation: filter.c:zend_ast_get_znode
Unexecuted instantiation: glob_wrapper.c:zend_ast_get_znode
Unexecuted instantiation: memory.c:zend_ast_get_znode
Unexecuted instantiation: mmap.c:zend_ast_get_znode
Unexecuted instantiation: plain_wrapper.c:zend_ast_get_znode
Unexecuted instantiation: streams.c:zend_ast_get_znode
Unexecuted instantiation: transports.c:zend_ast_get_znode
Unexecuted instantiation: userspace.c:zend_ast_get_znode
Unexecuted instantiation: xp_socket.c:zend_ast_get_znode
Unexecuted instantiation: block_pass.c:zend_ast_get_znode
Unexecuted instantiation: compact_literals.c:zend_ast_get_znode
Unexecuted instantiation: compact_vars.c:zend_ast_get_znode
Unexecuted instantiation: dce.c:zend_ast_get_znode
Unexecuted instantiation: dfa_pass.c:zend_ast_get_znode
Unexecuted instantiation: escape_analysis.c:zend_ast_get_znode
Unexecuted instantiation: nop_removal.c:zend_ast_get_znode
Unexecuted instantiation: optimize_func_calls.c:zend_ast_get_znode
Unexecuted instantiation: optimize_temp_vars_5.c:zend_ast_get_znode
Unexecuted instantiation: pass1.c:zend_ast_get_znode
Unexecuted instantiation: pass3.c:zend_ast_get_znode
Unexecuted instantiation: sccp.c:zend_ast_get_znode
Unexecuted instantiation: scdf.c:zend_ast_get_znode
Unexecuted instantiation: zend_call_graph.c:zend_ast_get_znode
Unexecuted instantiation: zend_cfg.c:zend_ast_get_znode
Unexecuted instantiation: zend_dfg.c:zend_ast_get_znode
Unexecuted instantiation: zend_dump.c:zend_ast_get_znode
Unexecuted instantiation: zend_func_info.c:zend_ast_get_znode
Unexecuted instantiation: zend_inference.c:zend_ast_get_znode
Unexecuted instantiation: zend_optimizer.c:zend_ast_get_znode
Unexecuted instantiation: zend_ssa.c:zend_ast_get_znode
Unexecuted instantiation: zend_alloc.c:zend_ast_get_znode
Unexecuted instantiation: zend_API.c:zend_ast_get_znode
Unexecuted instantiation: zend_ast.c:zend_ast_get_znode
Unexecuted instantiation: zend_attributes.c:zend_ast_get_znode
Unexecuted instantiation: zend_builtin_functions.c:zend_ast_get_znode
Unexecuted instantiation: zend_call_stack.c:zend_ast_get_znode
Unexecuted instantiation: zend_closures.c:zend_ast_get_znode
zend_compile.c:zend_ast_get_znode
Line
Count
Source
102
153k
static zend_always_inline znode *zend_ast_get_znode(zend_ast *ast) {
103
153k
  return &((zend_ast_znode *) ast)->node;
104
153k
}
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
3.07M
#define ZEND_LIVE_TMPVAR  0
181
61.2k
#define ZEND_LIVE_LOOP    1
182
7.79M
#define ZEND_LIVE_SILENCE 2
183
55.8k
#define ZEND_LIVE_ROPE    3
184
534k
#define ZEND_LIVE_NEW     4
185
807k
#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
  int        vars_size;
201
  int        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
2.03M
#define ZEND_ACC_PUBLIC                  (1 <<  0) /*     |  X  |  X  |  X  */
221
27.8M
#define ZEND_ACC_PROTECTED               (1 <<  1) /*     |  X  |  X  |  X  */
222
28.7M
#define ZEND_ACC_PRIVATE                 (1 <<  2) /*     |  X  |  X  |  X  */
223
/*                                                        |     |     |     */
224
/* Property or method overrides private one               |     |     |     */
225
26.8M
#define ZEND_ACC_CHANGED                 (1 <<  3) /*     |  X  |  X  |     */
226
/*                                                        |     |     |     */
227
/* Static method or property                              |     |     |     */
228
992k
#define ZEND_ACC_STATIC                  (1 <<  4) /*     |  X  |  X  |     */
229
/*                                                        |     |     |     */
230
/* Final class or method                                  |     |     |     */
231
901k
#define ZEND_ACC_FINAL                   (1 <<  5) /*  X  |  X  |  X  |  X  */
232
/*                                                        |     |     |     */
233
/* Abstract method                                        |     |     |     */
234
448k
#define ZEND_ACC_ABSTRACT                (1 <<  6) /*  X  |  X  |  X  |     */
235
164k
#define ZEND_ACC_EXPLICIT_ABSTRACT_CLASS (1 <<  6) /*  X  |     |     |     */
236
/*                                                        |     |     |     */
237
/* Readonly property                                      |     |     |     */
238
1.70M
#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
481k
#define ZEND_ACC_IMMUTABLE               (1 <<  7) /*  X  |  X  |     |     */
243
/*                                                        |     |     |     */
244
/* Function has typed arguments / class has typed props   |     |     |     */
245
2.00M
#define ZEND_ACC_HAS_TYPE_HINTS          (1 <<  8) /*  X  |  X  |     |     */
246
/*                                                        |     |     |     */
247
/* Top-level class or function declaration                |     |     |     */
248
59.8k
#define ZEND_ACC_TOP_LEVEL               (1 <<  9) /*  X  |  X  |     |     */
249
/*                                                        |     |     |     */
250
/* op_array or class is preloaded                         |     |     |     */
251
82.1k
#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
4.82k
#define ZEND_CLASS_CONST_IS_CASE         (1 <<  6) /*     |     |     |  X  */
257
/*                                                        |     |     |     */
258
/* deprecation flag                                       |     |     |     */
259
85.7k
#define ZEND_ACC_DEPRECATED              (1 << 11) /*  X  |  X  |     |  X  */
260
/*                                                        |     |     |     */
261
/* has #[\Override] attribute                             |     |     |     */
262
112k
#define ZEND_ACC_OVERRIDE                (1 << 28) /*     |  X  |  X  |     */
263
/*                                                        |     |     |     */
264
/* Property Flags (unused: 13-27,29...)                   |     |     |     */
265
/* ===========                                            |     |     |     */
266
/*                                                        |     |     |     */
267
/* Promoted property / parameter                          |     |     |     */
268
935
#define ZEND_ACC_PROMOTED                (1 <<  8) /*     |     |  X  |     */
269
/*                                                        |     |     |     */
270
/* Virtual property without backing storage               |     |     |     */
271
322k
#define ZEND_ACC_VIRTUAL                 (1 <<  9) /*     |     |  X  |     */
272
/*                                                        |     |     |     */
273
/* Asymmetric visibility                                  |     |     |     */
274
1.55M
#define ZEND_ACC_PUBLIC_SET              (1 << 10) /*     |     |  X  |     */
275
1.55M
#define ZEND_ACC_PROTECTED_SET           (1 << 11) /*     |     |  X  |     */
276
1.55M
#define ZEND_ACC_PRIVATE_SET             (1 << 12) /*     |     |  X  |     */
277
/*                                                        |     |     |     */
278
/* Class Flags (unused: 31)                               |     |     |     */
279
/* ===========                                            |     |     |     */
280
/*                                                        |     |     |     */
281
/* Special class types                                    |     |     |     */
282
27.9M
#define ZEND_ACC_INTERFACE               (1 <<  0) /*  X  |     |     |     */
283
374k
#define ZEND_ACC_TRAIT                   (1 <<  1) /*  X  |     |     |     */
284
918k
#define ZEND_ACC_ANON_CLASS              (1 <<  2) /*  X  |     |     |     */
285
345k
#define ZEND_ACC_ENUM                    (1 << 28) /*  X  |     |     |     */
286
/*                                                        |     |     |     */
287
/* Class linked with parent, interfaces and traits        |     |     |     */
288
947k
#define ZEND_ACC_LINKED                  (1 <<  3) /*  X  |     |     |     */
289
/*                                                        |     |     |     */
290
/* Class is abstract, since it is set by any              |     |     |     */
291
/* abstract method                                        |     |     |     */
292
279k
#define ZEND_ACC_IMPLICIT_ABSTRACT_CLASS (1 <<  4) /*  X  |     |     |     */
293
/*                                                        |     |     |     */
294
/* Class has magic methods __get/__set/__unset/           |     |     |     */
295
/* __isset that use guards                                |     |     |     */
296
4.06M
#define ZEND_ACC_USE_GUARDS              (1 << 30) /*  X  |     |     |     */
297
/*                                                        |     |     |     */
298
/* Class constants updated                                |     |     |     */
299
160k
#define ZEND_ACC_CONSTANTS_UPDATED       (1 << 12) /*  X  |     |     |     */
300
/*                                                        |     |     |     */
301
/* Objects of this class may not have dynamic properties  |     |     |     */
302
7.05k
#define ZEND_ACC_NO_DYNAMIC_PROPERTIES   (1 << 13) /*  X  |     |     |     */
303
/*                                                        |     |     |     */
304
/* User class has methods with static variables           |     |     |     */
305
46.0M
#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
935k
#define ZEND_ACC_ALLOW_DYNAMIC_PROPERTIES (1 << 15) /* X  |     |     |     */
310
/*                                                        |     |     |     */
311
/* Readonly class                                         |     |     |     */
312
55.8k
#define ZEND_ACC_READONLY_CLASS          (1 << 16) /*  X  |     |     |     */
313
/*                                                        |     |     |     */
314
/* Parent class is resolved (CE).                         |     |     |     */
315
43.8k
#define ZEND_ACC_RESOLVED_PARENT         (1 << 17) /*  X  |     |     |     */
316
/*                                                        |     |     |     */
317
/* Interfaces are resolved (CEs).                         |     |     |     */
318
23.8k
#define ZEND_ACC_RESOLVED_INTERFACES     (1 << 18) /*  X  |     |     |     */
319
/*                                                        |     |     |     */
320
/* Class has unresolved variance obligations.             |     |     |     */
321
6.94k
#define ZEND_ACC_UNRESOLVED_VARIANCE     (1 << 19) /*  X  |     |     |     */
322
/*                                                        |     |     |     */
323
/* Class is linked apart from variance obligations.       |     |     |     */
324
958
#define ZEND_ACC_NEARLY_LINKED           (1 << 20) /*  X  |     |     |     */
325
/* Class has readonly props                               |     |     |     */
326
16.3k
#define ZEND_ACC_HAS_READONLY_PROPS      (1 << 21) /*  X  |     |     |     */
327
/*                                                        |     |     |     */
328
/* stored in opcache (may be partially)                   |     |     |     */
329
279k
#define ZEND_ACC_CACHED                  (1 << 22) /*  X  |     |     |     */
330
/*                                                        |     |     |     */
331
/* temporary flag used during delayed variance checks     |     |     |     */
332
1.22k
#define ZEND_ACC_CACHEABLE               (1 << 23) /*  X  |     |     |     */
333
/*                                                        |     |     |     */
334
11.9k
#define ZEND_ACC_HAS_AST_CONSTANTS       (1 << 24) /*  X  |     |     |     */
335
1.01M
#define ZEND_ACC_HAS_AST_PROPERTIES      (1 << 25) /*  X  |     |     |     */
336
2.04k
#define ZEND_ACC_HAS_AST_STATICS         (1 << 26) /*  X  |     |     |     */
337
/*                                                        |     |     |     */
338
/* loaded from file cache to process memory               |     |     |     */
339
97.5k
#define ZEND_ACC_FILE_CACHED             (1 << 27) /*  X  |     |     |     */
340
/*                                                        |     |     |     */
341
/* Class cannot be serialized or unserialized             |     |     |     */
342
867k
#define ZEND_ACC_NOT_SERIALIZABLE        (1 << 29) /*  X  |     |     |     */
343
/*                                                        |     |     |     */
344
/* Function Flags (unused: 30)                            |     |     |     */
345
/* ==============                                         |     |     |     */
346
/*                                                        |     |     |     */
347
/* Function returning by reference                        |     |     |     */
348
955k
#define ZEND_ACC_RETURN_REFERENCE        (1 << 12) /*     |  X  |     |     */
349
/*                                                        |     |     |     */
350
/* Function has a return type                             |     |     |     */
351
1.48M
#define ZEND_ACC_HAS_RETURN_TYPE         (1 << 13) /*     |  X  |     |     */
352
/*                                                        |     |     |     */
353
/* Function with variable number of arguments             |     |     |     */
354
2.14M
#define ZEND_ACC_VARIADIC                (1 << 14) /*     |  X  |     |     */
355
/*                                                        |     |     |     */
356
/* op_array has finally blocks (user only)                |     |     |     */
357
514k
#define ZEND_ACC_HAS_FINALLY_BLOCK       (1 << 15) /*     |  X  |     |     */
358
/*                                                        |     |     |     */
359
/* "main" op_array with                                   |     |     |     */
360
/* ZEND_DECLARE_CLASS_DELAYED opcodes                     |     |     |     */
361
61.8k
#define ZEND_ACC_EARLY_BINDING           (1 << 16) /*     |  X  |     |     */
362
/*                                                        |     |     |     */
363
/* closure uses $this                                     |     |     |     */
364
18.1k
#define ZEND_ACC_USES_THIS               (1 << 17) /*     |  X  |     |     */
365
/*                                                        |     |     |     */
366
/* call through user function trampoline. e.g.            |     |     |     */
367
/* __call, __callstatic                                   |     |     |     */
368
875k
#define ZEND_ACC_CALL_VIA_TRAMPOLINE     (1 << 18) /*     |  X  |     |     */
369
/*                                                        |     |     |     */
370
/* disable inline caching                                 |     |     |     */
371
0
#define ZEND_ACC_NEVER_CACHE             (1 << 19) /*     |  X  |     |     */
372
/*                                                        |     |     |     */
373
/* op_array is a clone of trait method                    |     |     |     */
374
68.8k
#define ZEND_ACC_TRAIT_CLONE             (1 << 20) /*     |  X  |     |     */
375
/*                                                        |     |     |     */
376
/* functions is a constructor                             |     |     |     */
377
23.3k
#define ZEND_ACC_CTOR                    (1 << 21) /*     |  X  |     |     */
378
/*                                                        |     |     |     */
379
/* Closure related                                        |     |     |     */
380
2.70M
#define ZEND_ACC_CLOSURE                 (1 << 22) /*     |  X  |     |     */
381
2.10M
#define ZEND_ACC_FAKE_CLOSURE            (1 << 23) /*     |  X  |     |     */ /* Same as ZEND_CALL_FAKE_CLOSURE */
382
/*                                                        |     |     |     */
383
1.71M
#define ZEND_ACC_GENERATOR               (1 << 24) /*     |  X  |     |     */
384
/*                                                        |     |     |     */
385
/* function was processed by pass two (user only)         |     |     |     */
386
2.77M
#define ZEND_ACC_DONE_PASS_TWO           (1 << 25) /*     |  X  |     |     */
387
/*                                                        |     |     |     */
388
/* internal function is allocated at arena (int only)     |     |     |     */
389
47.0k
#define ZEND_ACC_ARENA_ALLOCATED         (1 << 25) /*     |  X  |     |     */
390
/*                                                        |     |     |     */
391
/* run_time_cache allocated on heap (user only)           |     |     |     */
392
474k
#define ZEND_ACC_HEAP_RT_CACHE           (1 << 26) /*     |  X  |     |     */
393
/*                                                        |     |     |     */
394
/* method flag used by Closure::__invoke() (int only)     |     |     |     */
395
6.35k
#define ZEND_ACC_USER_ARG_INFO           (1 << 26) /*     |  X  |     |     */
396
/*                                                        |     |     |     */
397
/* supports opcache compile-time evaluation (funcs)       |     |     |     */
398
0
#define ZEND_ACC_COMPILE_TIME_EVAL       (1 << 27) /*     |  X  |     |     */
399
/*                                                        |     |     |     */
400
/* Has IS_PTR operands that needs special cleaning; same  |     |     |     */
401
/* value as ZEND_ACC_OVERRIDE but override is for class   |     |     |     */
402
/* methods and this is for the top level op array         |     |     |     */
403
350k
#define ZEND_ACC_PTR_OPS                 (1 << 28) /*     |  X  |     |     */
404
/*                                                        |     |     |     */
405
/* has #[\NoDiscard] attribute                            |     |     |     */
406
6.75M
#define ZEND_ACC_NODISCARD               (1 << 29) /*     |  X  |     |     */
407
/*                                                        |     |     |     */
408
/* op_array uses strict mode types                        |     |     |     */
409
5.26M
#define ZEND_ACC_STRICT_TYPES            (1U << 31) /*    |  X  |     |     */
410
411
1.64M
#define ZEND_ACC_PPP_MASK  (ZEND_ACC_PUBLIC | ZEND_ACC_PROTECTED | ZEND_ACC_PRIVATE)
412
1.53M
#define ZEND_ACC_PPP_SET_MASK  (ZEND_ACC_PUBLIC_SET | ZEND_ACC_PROTECTED_SET | ZEND_ACC_PRIVATE_SET)
413
414
static zend_always_inline uint32_t zend_visibility_to_set_visibility(uint32_t visibility)
415
760
{
416
760
  switch (visibility) {
417
720
    case ZEND_ACC_PUBLIC:
418
720
      return ZEND_ACC_PUBLIC_SET;
419
12
    case ZEND_ACC_PROTECTED:
420
12
      return ZEND_ACC_PROTECTED_SET;
421
28
    case ZEND_ACC_PRIVATE:
422
28
      return ZEND_ACC_PRIVATE_SET;
423
0
    EMPTY_SWITCH_DEFAULT_CASE();
424
760
  }
425
760
}
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
415
733
{
416
733
  switch (visibility) {
417
698
    case ZEND_ACC_PUBLIC:
418
698
      return ZEND_ACC_PUBLIC_SET;
419
7
    case ZEND_ACC_PROTECTED:
420
7
      return ZEND_ACC_PROTECTED_SET;
421
28
    case ZEND_ACC_PRIVATE:
422
28
      return ZEND_ACC_PRIVATE_SET;
423
0
    EMPTY_SWITCH_DEFAULT_CASE();
424
733
  }
425
733
}
Unexecuted instantiation: zend_ast.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_attributes.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_builtin_functions.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_call_stack.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_closures.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_compile.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_constants.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_default_classes.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_dtrace.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_enum.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_exceptions.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_execute_API.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_execute.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_extensions.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_fibers.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_float.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_gc.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_generators.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_hash.c:zend_visibility_to_set_visibility
Unexecuted instantiation: zend_highlight.c:zend_visibility_to_set_visibility
zend_inheritance.c:zend_visibility_to_set_visibility
Line
Count
Source
415
27
{
416
27
  switch (visibility) {
417
22
    case ZEND_ACC_PUBLIC:
418
22
      return ZEND_ACC_PUBLIC_SET;
419
5
    case ZEND_ACC_PROTECTED:
420
5
      return ZEND_ACC_PROTECTED_SET;
421
0
    case ZEND_ACC_PRIVATE:
422
0
      return ZEND_ACC_PRIVATE_SET;
423
0
    EMPTY_SWITCH_DEFAULT_CASE();
424
27
  }
425
27
}
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
426
427
/* call through internal function handler. e.g. Closure::invoke() */
428
420
#define ZEND_ACC_CALL_VIA_HANDLER     ZEND_ACC_CALL_VIA_TRAMPOLINE
429
430
#define ZEND_ACC_UNINSTANTIABLE (       \
431
  ZEND_ACC_INTERFACE |                \
432
  ZEND_ACC_TRAIT |                    \
433
  ZEND_ACC_IMPLICIT_ABSTRACT_CLASS |  \
434
  ZEND_ACC_EXPLICIT_ABSTRACT_CLASS |  \
435
  ZEND_ACC_ENUM                       \
436
)
437
438
77.2k
#define ZEND_SHORT_CIRCUITING_CHAIN_MASK 0x3
439
125k
#define ZEND_SHORT_CIRCUITING_CHAIN_EXPR 0
440
624
#define ZEND_SHORT_CIRCUITING_CHAIN_ISSET 1
441
57
#define ZEND_SHORT_CIRCUITING_CHAIN_EMPTY 2
442
443
// Must not clash with ZEND_SHORT_CIRCUITING_CHAIN_MASK
444
52.7k
#define ZEND_JMP_NULL_BP_VAR_IS 4
445
446
const char *zend_visibility_string(uint32_t fn_flags);
447
448
57.6k
#define ZEND_PROPERTY_HOOK_COUNT 2
449
9.31k
#define ZEND_PROPERTY_HOOK_STRUCT_SIZE (sizeof(zend_function*) * ZEND_PROPERTY_HOOK_COUNT)
450
451
/* Stored in zend_property_info.offset, not returned by zend_get_property_offset(). */
452
6.53k
#define ZEND_VIRTUAL_PROPERTY_OFFSET ((uint32_t)-1)
453
454
zend_property_hook_kind zend_get_property_hook_kind_from_name(zend_string *name);
455
456
typedef struct _zend_property_info {
457
  uint32_t offset; /* property offset for object properties or
458
                        property index for static properties */
459
  uint32_t flags;
460
  zend_string *name;
461
  zend_string *doc_comment;
462
  HashTable *attributes;
463
  zend_class_entry *ce;
464
  zend_type type;
465
  const zend_property_info *prototype;
466
  zend_function **hooks;
467
} zend_property_info;
468
469
#define OBJ_PROP(obj, offset) \
470
23.9M
  ((zval*)((char*)(obj) + offset))
471
#define OBJ_PROP_NUM(obj, num) \
472
2.97M
  (&(obj)->properties_table[(num)])
473
#define OBJ_PROP_TO_OFFSET(num) \
474
138k
  ((uint32_t)(XtOffsetOf(zend_object, properties_table) + sizeof(zval) * (num)))
475
#define OBJ_PROP_TO_NUM(offset) \
476
88.9k
  (((offset) - OBJ_PROP_TO_OFFSET(0)) / sizeof(zval))
477
#define OBJ_PROP_SLOT_TO_OFFSET(obj, slot) \
478
162
  ((uintptr_t)(slot) - (uintptr_t)(obj))
479
480
typedef struct _zend_class_constant {
481
  zval value; /* flags are stored in u2 */
482
  zend_string *doc_comment;
483
  HashTable *attributes;
484
  zend_class_entry *ce;
485
  zend_type type;
486
} zend_class_constant;
487
488
45.0k
#define ZEND_CLASS_CONST_FLAGS(c) Z_CONSTANT_FLAGS((c)->value)
489
490
/* arg_info for internal functions */
491
typedef struct _zend_internal_arg_info {
492
  const char *name;
493
  zend_type type;
494
  const char *default_value;
495
} zend_internal_arg_info;
496
497
/* arg_info for user functions */
498
typedef struct _zend_arg_info {
499
  zend_string *name;
500
  zend_type type;
501
  zend_string *default_value;
502
} zend_arg_info;
503
504
/* the following structure repeats the layout of zend_internal_arg_info,
505
 * but its fields have different meaning. It's used as the first element of
506
 * arg_info array to define properties of internal functions.
507
 * It's also used for the return type.
508
 */
509
typedef struct _zend_internal_function_info {
510
  uintptr_t required_num_args;
511
  zend_type type;
512
  const char *default_value;
513
} zend_internal_function_info;
514
515
struct _zend_op_array {
516
  /* Common elements */
517
  uint8_t type;
518
  uint8_t arg_flags[3]; /* bitset of arg_info.pass_by_reference */
519
  uint32_t fn_flags;
520
  zend_string *function_name;
521
  zend_class_entry *scope;
522
  zend_function *prototype;
523
  uint32_t num_args;
524
  uint32_t required_num_args;
525
  zend_arg_info *arg_info;
526
  HashTable *attributes;
527
  ZEND_MAP_PTR_DEF(void **, run_time_cache);
528
  zend_string *doc_comment;
529
  uint32_t T;         /* number of temporary variables */
530
  const zend_property_info *prop_info; /* The corresponding prop_info if this is a hook. */
531
  /* END of common elements */
532
533
  int cache_size;     /* number of run_time_cache_slots * sizeof(void*) */
534
  int last_var;       /* number of CV variables */
535
  uint32_t last;      /* number of opcodes */
536
537
  zend_op *opcodes;
538
  ZEND_MAP_PTR_DEF(HashTable *, static_variables_ptr);
539
  HashTable *static_variables;
540
  zend_string **vars; /* names of CV variables */
541
542
  uint32_t *refcount;
543
544
  int last_live_range;
545
  int last_try_catch;
546
  zend_live_range *live_range;
547
  zend_try_catch_element *try_catch_array;
548
549
  zend_string *filename;
550
  uint32_t line_start;
551
  uint32_t line_end;
552
553
  int last_literal;
554
  uint32_t num_dynamic_func_defs;
555
  zval *literals;
556
557
  /* Functions that are declared dynamically are stored here and
558
   * referenced by index from opcodes. */
559
  zend_op_array **dynamic_func_defs;
560
561
  void *reserved[ZEND_MAX_RESERVED_RESOURCES];
562
};
563
564
565
#define ZEND_RETURN_VALUE       0
566
#define ZEND_RETURN_REFERENCE     1
567
568
#define INTERNAL_FUNCTION_PARAMETERS zend_execute_data *execute_data, zval *return_value
569
16.3k
#define INTERNAL_FUNCTION_PARAM_PASSTHRU execute_data, return_value
570
571
/* zend_internal_function_handler */
572
typedef void (ZEND_FASTCALL *zif_handler)(INTERNAL_FUNCTION_PARAMETERS);
573
574
typedef struct _zend_internal_function {
575
  /* Common elements */
576
  uint8_t type;
577
  uint8_t arg_flags[3]; /* bitset of arg_info.pass_by_reference */
578
  uint32_t fn_flags;
579
  zend_string* function_name;
580
  zend_class_entry *scope;
581
  zend_function *prototype;
582
  uint32_t num_args;
583
  uint32_t required_num_args;
584
  zend_internal_arg_info *arg_info;
585
  HashTable *attributes;
586
  ZEND_MAP_PTR_DEF(void **, run_time_cache);
587
  zend_string *doc_comment;
588
  uint32_t T;         /* number of temporary variables */
589
  const zend_property_info *prop_info; /* The corresponding prop_info if this is a hook. */
590
  /* END of common elements */
591
592
  zif_handler handler;
593
  struct _zend_module_entry *module;
594
  const zend_frameless_function_info *frameless_function_infos;
595
  void *reserved[ZEND_MAX_RESERVED_RESOURCES];
596
} zend_internal_function;
597
598
476
#define ZEND_FN_SCOPE_NAME(function)  ((function) && (function)->common.scope ? ZSTR_VAL((function)->common.scope->name) : "")
599
600
union _zend_function {
601
  uint8_t type; /* MUST be the first element of this struct! */
602
  uint32_t   quick_arg_flags;
603
604
  struct {
605
    uint8_t type;  /* never used */
606
    uint8_t arg_flags[3]; /* bitset of arg_info.pass_by_reference */
607
    uint32_t fn_flags;
608
    zend_string *function_name;
609
    zend_class_entry *scope;
610
    zend_function *prototype;
611
    uint32_t num_args;
612
    uint32_t required_num_args;
613
    zend_arg_info *arg_info;  /* index -1 represents the return value info, if any */
614
    HashTable   *attributes;
615
    ZEND_MAP_PTR_DEF(void **, run_time_cache);
616
    zend_string *doc_comment;
617
    uint32_t T;         /* number of temporary variables */
618
    const zend_property_info *prop_info; /* The corresponding prop_info if this is a hook. */
619
  } common;
620
621
  zend_op_array op_array;
622
  zend_internal_function internal_function;
623
};
624
625
struct _zend_execute_data {
626
  const zend_op       *opline;           /* executed opline                */
627
  zend_execute_data   *call;             /* current call                   */
628
  zval                *return_value;
629
  zend_function       *func;             /* executed function              */
630
  zval                 This;             /* this + call_info + num_args    */
631
  zend_execute_data   *prev_execute_data;
632
  zend_array          *symbol_table;
633
  void               **run_time_cache;   /* cache op_array->run_time_cache */
634
  zend_array          *extra_named_params;
635
};
636
637
1.43M
#define ZEND_CALL_HAS_THIS           IS_OBJECT_EX
638
639
/* Top 16 bits of Z_TYPE_INFO(EX(This)) are used as call_info flags */
640
1.87M
#define ZEND_CALL_FUNCTION           (0 << 16)
641
176k
#define ZEND_CALL_CODE               (1 << 16)
642
696k
#define ZEND_CALL_NESTED             (0 << 17)
643
872k
#define ZEND_CALL_TOP                (1 << 17)
644
343
#define ZEND_CALL_ALLOCATED          (1 << 18)
645
4.08k
#define ZEND_CALL_FREE_EXTRA_ARGS    (1 << 19)
646
316k
#define ZEND_CALL_HAS_SYMBOL_TABLE   (1 << 20)
647
607k
#define ZEND_CALL_RELEASE_THIS       (1 << 21)
648
19.9k
#define ZEND_CALL_CLOSURE            (1 << 22)
649
93
#define ZEND_CALL_FAKE_CLOSURE       (1 << 23) /* Same as ZEND_ACC_FAKE_CLOSURE */
650
5.83k
#define ZEND_CALL_GENERATOR          (1 << 24)
651
772k
#define ZEND_CALL_DYNAMIC            (1 << 25)
652
#define ZEND_CALL_MAY_HAVE_UNDEF     (1 << 26)
653
852k
#define ZEND_CALL_HAS_EXTRA_NAMED_PARAMS (1 << 27)
654
#define ZEND_CALL_OBSERVED           (1 << 28) /* "fcall_begin" observer handler may set this flag */
655
                                               /* to prevent optimization in RETURN handler and    */
656
                                               /* keep all local variables for "fcall_end" handler */
657
0
#define ZEND_CALL_JIT_RESERVED       (1 << 29) /* reserved for tracing JIT */
658
136k
#define ZEND_CALL_NEEDS_REATTACH     (1 << 30)
659
#define ZEND_CALL_SEND_ARG_BY_REF    (1u << 31)
660
661
623k
#define ZEND_CALL_NESTED_FUNCTION    (ZEND_CALL_FUNCTION | ZEND_CALL_NESTED)
662
70.2k
#define ZEND_CALL_NESTED_CODE        (ZEND_CALL_CODE | ZEND_CALL_NESTED)
663
763k
#define ZEND_CALL_TOP_FUNCTION       (ZEND_CALL_TOP | ZEND_CALL_FUNCTION)
664
105k
#define ZEND_CALL_TOP_CODE           (ZEND_CALL_CODE | ZEND_CALL_TOP)
665
666
#define ZEND_CALL_INFO(call) \
667
4.96M
  Z_TYPE_INFO((call)->This)
668
669
#define ZEND_CALL_KIND_EX(call_info) \
670
  (call_info & (ZEND_CALL_CODE | ZEND_CALL_TOP))
671
672
#define ZEND_CALL_KIND(call) \
673
  ZEND_CALL_KIND_EX(ZEND_CALL_INFO(call))
674
675
136k
#define ZEND_ADD_CALL_FLAG_EX(call_info, flag) do { \
676
136k
    call_info |= (flag); \
677
136k
  } while (0)
678
679
904
#define ZEND_DEL_CALL_FLAG_EX(call_info, flag) do { \
680
904
    call_info &= ~(flag); \
681
904
  } while (0)
682
683
131k
#define ZEND_ADD_CALL_FLAG(call, flag) do { \
684
131k
    ZEND_ADD_CALL_FLAG_EX(Z_TYPE_INFO((call)->This), flag); \
685
131k
  } while (0)
686
687
904
#define ZEND_DEL_CALL_FLAG(call, flag) do { \
688
904
    ZEND_DEL_CALL_FLAG_EX(Z_TYPE_INFO((call)->This), flag); \
689
904
  } while (0)
690
691
#define ZEND_CALL_NUM_ARGS(call) \
692
14.7M
  (call)->This.u2.num_args
693
694
/* Ensure the correct alignment before slots calculation */
695
ZEND_STATIC_ASSERT(ZEND_MM_ALIGNED_SIZE(sizeof(zval)) == sizeof(zval),
696
                   "zval must be aligned by ZEND_MM_ALIGNMENT");
697
/* A number of call frame slots (zvals) reserved for zend_execute_data. */
698
#define ZEND_CALL_FRAME_SLOT \
699
138M
  ((int)((sizeof(zend_execute_data) + sizeof(zval) - 1) / sizeof(zval)))
700
701
#define ZEND_CALL_VAR(call, n) \
702
18.0M
  ((zval*)(((char*)(call)) + ((int)(n))))
703
704
#define ZEND_CALL_VAR_NUM(call, n) \
705
8.13M
  (((zval*)(call)) + (ZEND_CALL_FRAME_SLOT + ((int)(n))))
706
707
#define ZEND_CALL_ARG(call, n) \
708
6.20M
  ZEND_CALL_VAR_NUM(call, ((int)(n)) - 1)
709
710
36.4M
#define EX(element)       ((execute_data)->element)
711
712
467k
#define EX_CALL_INFO()      ZEND_CALL_INFO(execute_data)
713
#define EX_CALL_KIND()      ZEND_CALL_KIND(execute_data)
714
1.62M
#define EX_NUM_ARGS()     ZEND_CALL_NUM_ARGS(execute_data)
715
716
#define ZEND_CALL_USES_STRICT_TYPES(call) \
717
4.04M
  (((call)->func->common.fn_flags & ZEND_ACC_STRICT_TYPES) != 0)
718
719
#define EX_USES_STRICT_TYPES() \
720
2.00M
  ZEND_CALL_USES_STRICT_TYPES(execute_data)
721
722
#define ZEND_ARG_USES_STRICT_TYPES() \
723
22.7k
  (EG(current_execute_data)->prev_execute_data && \
724
11.2k
   EG(current_execute_data)->prev_execute_data->func && \
725
22.7k
   ZEND_CALL_USES_STRICT_TYPES(EG(current_execute_data)->prev_execute_data))
726
727
#define ZEND_FLF_ARG_USES_STRICT_TYPES() \
728
  (EG(current_execute_data) && \
729
   EG(current_execute_data)->func && \
730
   ZEND_CALL_USES_STRICT_TYPES(EG(current_execute_data)))
731
732
#define ZEND_RET_USES_STRICT_TYPES() \
733
354
  ZEND_CALL_USES_STRICT_TYPES(EG(current_execute_data))
734
735
16.7M
#define EX_VAR(n)       ZEND_CALL_VAR(execute_data, n)
736
526k
#define EX_VAR_NUM(n)     ZEND_CALL_VAR_NUM(execute_data, n)
737
738
73.1M
#define EX_VAR_TO_NUM(n)    ((uint32_t)((n) / sizeof(zval) - ZEND_CALL_FRAME_SLOT))
739
55.9M
#define EX_NUM_TO_VAR(n)    ((uint32_t)(((n) + ZEND_CALL_FRAME_SLOT) * sizeof(zval)))
740
741
#define ZEND_OPLINE_TO_OFFSET(opline, target) \
742
233k
  ((char*)(target) - (char*)(opline))
743
744
#define ZEND_OPLINE_NUM_TO_OFFSET(op_array, opline, opline_num) \
745
1.88M
  ((char*)&(op_array)->opcodes[opline_num] - (char*)(opline))
746
747
#define ZEND_OFFSET_TO_OPLINE(base, offset) \
748
479k
  ((zend_op*)(((char*)(base)) + (int)offset))
749
750
#define ZEND_OFFSET_TO_OPLINE_NUM(op_array, base, offset) \
751
19.5k
  (ZEND_OFFSET_TO_OPLINE(base, offset) - op_array->opcodes)
752
753
#if ZEND_USE_ABS_JMP_ADDR
754
755
/* run-time jump target */
756
# define OP_JMP_ADDR(opline, node) \
757
  (node).jmp_addr
758
759
# define ZEND_SET_OP_JMP_ADDR(opline, node, val) do { \
760
    (node).jmp_addr = (val); \
761
  } while (0)
762
763
/* convert jump target from compile-time to run-time */
764
# define ZEND_PASS_TWO_UPDATE_JMP_TARGET(op_array, opline, node) do { \
765
    (node).jmp_addr = (op_array)->opcodes + (node).opline_num; \
766
  } while (0)
767
768
/* convert jump target back from run-time to compile-time */
769
# define ZEND_PASS_TWO_UNDO_JMP_TARGET(op_array, opline, node) do { \
770
    (node).opline_num = (node).jmp_addr - (op_array)->opcodes; \
771
  } while (0)
772
773
#else
774
775
/* run-time jump target */
776
# define OP_JMP_ADDR(opline, node) \
777
460k
  ZEND_OFFSET_TO_OPLINE(opline, (node).jmp_offset)
778
779
218k
# define ZEND_SET_OP_JMP_ADDR(opline, node, val) do { \
780
218k
    (node).jmp_offset = ZEND_OPLINE_TO_OFFSET(opline, val); \
781
218k
  } while (0)
782
783
/* convert jump target from compile-time to run-time */
784
1.82M
# define ZEND_PASS_TWO_UPDATE_JMP_TARGET(op_array, opline, node) do { \
785
1.82M
    (node).jmp_offset = ZEND_OPLINE_NUM_TO_OFFSET(op_array, opline, (node).opline_num); \
786
1.82M
  } while (0)
787
788
/* convert jump target back from run-time to compile-time */
789
# define ZEND_PASS_TWO_UNDO_JMP_TARGET(op_array, opline, node) do { \
790
    (node).opline_num = ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, (node).jmp_offset); \
791
  } while (0)
792
793
#endif
794
795
/* constant-time constant */
796
# define CT_CONSTANT_EX(op_array, num) \
797
32.8M
  ((op_array)->literals + (num))
798
799
# define CT_CONSTANT(node) \
800
5.61k
  CT_CONSTANT_EX(CG(active_op_array), (node).constant)
801
802
#if ZEND_USE_ABS_CONST_ADDR
803
804
/* run-time constant */
805
# define RT_CONSTANT(opline, node) \
806
  (node).zv
807
808
/* convert constant from compile-time to run-time */
809
# define ZEND_PASS_TWO_UPDATE_CONSTANT(op_array, opline, node) do { \
810
    (node).zv = CT_CONSTANT_EX(op_array, (node).constant); \
811
  } while (0)
812
813
#else
814
815
/* At run-time, constants are allocated together with op_array->opcodes
816
 * and addressed relatively to current opline.
817
 */
818
819
/* run-time constant */
820
# define RT_CONSTANT(opline, node) \
821
4.88M
  ((zval*)(((char*)(opline)) + (int32_t)(node).constant))
822
823
/* convert constant from compile-time to run-time */
824
10.3M
# define ZEND_PASS_TWO_UPDATE_CONSTANT(op_array, opline, node) do { \
825
10.3M
    (node).constant = \
826
10.3M
      (((char*)CT_CONSTANT_EX(op_array, (node).constant)) - \
827
10.3M
      ((char*)opline)); \
828
10.3M
  } while (0)
829
830
#endif
831
832
/* convert constant back from run-time to compile-time */
833
1.08M
#define ZEND_PASS_TWO_UNDO_CONSTANT(op_array, opline, node) do { \
834
1.08M
    (node).constant = RT_CONSTANT(opline, node) - (op_array)->literals; \
835
1.08M
  } while (0)
836
837
#define RUN_TIME_CACHE(op_array) \
838
564k
  ZEND_MAP_PTR_GET((op_array)->run_time_cache)
839
840
#define ZEND_OP_ARRAY_EXTENSION(op_array, handle) \
841
0
  ((void**)RUN_TIME_CACHE(op_array))[handle]
842
843
129M
#define IS_UNUSED 0    /* Unused operand */
844
202M
#define IS_CONST  (1<<0)
845
364M
#define IS_TMP_VAR  (1<<1)
846
335M
#define IS_VAR    (1<<2)
847
65.1M
#define IS_CV   (1<<3)  /* Compiled variable */
848
849
/* Used for result.type of smart branch instructions */
850
959k
#define IS_SMART_BRANCH_JMPZ  (1<<4)
851
964k
#define IS_SMART_BRANCH_JMPNZ (1<<5)
852
853
30.1k
#define ZEND_EXTRA_VALUE 1
854
855
#include "zend_globals.h"
856
857
typedef enum _zend_compile_position {
858
  ZEND_COMPILE_POSITION_AT_SHEBANG = 0,
859
  ZEND_COMPILE_POSITION_AT_OPEN_TAG,
860
  ZEND_COMPILE_POSITION_AFTER_OPEN_TAG
861
} zend_compile_position;
862
863
BEGIN_EXTERN_C()
864
865
void init_compiler(void);
866
void shutdown_compiler(void);
867
void zend_init_compiler_data_structures(void);
868
869
void zend_oparray_context_begin(zend_oparray_context *prev_context, zend_op_array *op_array);
870
void zend_oparray_context_end(zend_oparray_context *prev_context);
871
void zend_file_context_begin(zend_file_context *prev_context);
872
void zend_file_context_end(zend_file_context *prev_context);
873
874
extern ZEND_API zend_op_array *(*zend_compile_file)(zend_file_handle *file_handle, int type);
875
extern ZEND_API zend_op_array *(*zend_compile_string)(zend_string *source_string, const char *filename, zend_compile_position position);
876
877
ZEND_API int ZEND_FASTCALL lex_scan(zval *zendlval, zend_parser_stack_elem *elem);
878
void startup_scanner(void);
879
void shutdown_scanner(void);
880
881
ZEND_API zend_string *zend_set_compiled_filename(zend_string *new_compiled_filename);
882
ZEND_API void zend_restore_compiled_filename(zend_string *original_compiled_filename);
883
ZEND_API zend_string *zend_get_compiled_filename(void);
884
ZEND_API int zend_get_compiled_lineno(void);
885
ZEND_API size_t zend_get_scanned_file_offset(void);
886
887
ZEND_API zend_string *zend_get_compiled_variable_name(const zend_op_array *op_array, uint32_t var);
888
889
#ifdef ZTS
890
const char *zend_get_zendtext(void);
891
#endif
892
893
typedef zend_result (ZEND_FASTCALL *unary_op_type)(zval *, zval *);
894
typedef zend_result (ZEND_FASTCALL *binary_op_type)(zval *, zval *, zval *);
895
896
ZEND_API unary_op_type get_unary_op(int opcode);
897
ZEND_API binary_op_type get_binary_op(int opcode);
898
899
void zend_stop_lexing(void);
900
void zend_emit_final_return(bool return_one);
901
902
typedef enum {
903
  ZEND_MODIFIER_TARGET_PROPERTY = 0,
904
  ZEND_MODIFIER_TARGET_METHOD,
905
  ZEND_MODIFIER_TARGET_CONSTANT,
906
  ZEND_MODIFIER_TARGET_CPP,
907
  ZEND_MODIFIER_TARGET_PROPERTY_HOOK,
908
} zend_modifier_target;
909
910
/* Used during AST construction */
911
zend_ast *zend_ast_append_str(zend_ast *left, zend_ast *right);
912
zend_ast *zend_negate_num_string(zend_ast *ast);
913
uint32_t zend_add_class_modifier(uint32_t flags, uint32_t new_flag);
914
uint32_t zend_add_anonymous_class_modifier(uint32_t flags, uint32_t new_flag);
915
uint32_t zend_add_member_modifier(uint32_t flags, uint32_t new_flag, zend_modifier_target target);
916
917
uint32_t zend_modifier_token_to_flag(zend_modifier_target target, uint32_t flags);
918
uint32_t zend_modifier_list_to_flags(zend_modifier_target target, zend_ast *modifiers);
919
920
bool zend_handle_encoding_declaration(zend_ast *ast);
921
922
ZEND_API zend_class_entry *zend_bind_class_in_slot(
923
    zval *class_table_slot, zval *lcname, zend_string *lc_parent_name);
924
ZEND_API zend_result do_bind_function(zend_function *func, zval *lcname);
925
ZEND_API zend_result do_bind_class(zval *lcname, zend_string *lc_parent_name);
926
927
void zend_resolve_goto_label(zend_op_array *op_array, zend_op *opline);
928
929
ZEND_API void function_add_ref(zend_function *function);
930
zend_string *zval_make_interned_string(zval *zv);
931
932
1.61M
#define INITIAL_OP_ARRAY_SIZE 64
933
934
935
/* helper functions in zend_language_scanner.l */
936
struct _zend_arena;
937
938
ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type);
939
ZEND_API zend_op_array *compile_string(zend_string *source_string, const char *filename, zend_compile_position position);
940
ZEND_API zend_op_array *compile_filename(int type, zend_string *filename);
941
ZEND_API zend_ast *zend_compile_string_to_ast(
942
    zend_string *code, struct _zend_arena **ast_arena, zend_string *filename);
943
ZEND_API zend_result zend_execute_scripts(int type, zval *retval, int file_count, ...);
944
ZEND_API zend_result zend_execute_script(int type, zval *retval, zend_file_handle *file_handle);
945
ZEND_API zend_result open_file_for_scanning(zend_file_handle *file_handle);
946
ZEND_API void init_op_array(zend_op_array *op_array, uint8_t type, int initial_ops_size);
947
ZEND_API void destroy_op_array(zend_op_array *op_array);
948
ZEND_API void zend_destroy_static_vars(zend_op_array *op_array);
949
ZEND_API void zend_destroy_file_handle(zend_file_handle *file_handle);
950
ZEND_API void zend_cleanup_mutable_class_data(zend_class_entry *ce);
951
ZEND_API void zend_cleanup_internal_class_data(zend_class_entry *ce);
952
ZEND_API void zend_type_release(zend_type type, bool persistent);
953
ZEND_API zend_string *zend_create_member_string(zend_string *class_name, zend_string *member_name);
954
955
956
ZEND_API ZEND_COLD void zend_user_exception_handler(void);
957
958
#define zend_try_exception_handler() do { \
959
    if (UNEXPECTED(EG(exception))) { \
960
      if (Z_TYPE(EG(user_exception_handler)) != IS_UNDEF) { \
961
        zend_user_exception_handler(); \
962
      } \
963
    } \
964
  } while (0)
965
966
void zend_free_internal_arg_info(zend_internal_function *function);
967
ZEND_API void destroy_zend_function(zend_function *function);
968
ZEND_API void zend_function_dtor(zval *zv);
969
ZEND_API void destroy_zend_class(zval *zv);
970
void zend_class_add_ref(zval *zv);
971
972
ZEND_API zend_string *zend_mangle_property_name(const char *src1, size_t src1_length, const char *src2, size_t src2_length, bool internal);
973
#define zend_unmangle_property_name(mangled_property, class_name, prop_name) \
974
478k
        zend_unmangle_property_name_ex(mangled_property, class_name, prop_name, NULL)
975
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);
976
977
467k
static zend_always_inline const char *zend_get_unmangled_property_name(const zend_string *mangled_prop) {
978
467k
  const char *class_name, *prop_name;
979
467k
  zend_unmangle_property_name(mangled_prop, &class_name, &prop_name);
980
467k
  return prop_name;
981
467k
}
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
977
458k
static zend_always_inline const char *zend_get_unmangled_property_name(const zend_string *mangled_prop) {
978
458k
  const char *class_name, *prop_name;
979
  zend_unmangle_property_name(mangled_prop, &class_name, &prop_name);
980
458k
  return prop_name;
981
458k
}
var.c:zend_get_unmangled_property_name
Line
Count
Source
977
319
static zend_always_inline const char *zend_get_unmangled_property_name(const zend_string *mangled_prop) {
978
319
  const char *class_name, *prop_name;
979
  zend_unmangle_property_name(mangled_prop, &class_name, &prop_name);
980
319
  return prop_name;
981
319
}
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
977
5.53k
static zend_always_inline const char *zend_get_unmangled_property_name(const zend_string *mangled_prop) {
978
5.53k
  const char *class_name, *prop_name;
979
  zend_unmangle_property_name(mangled_prop, &class_name, &prop_name);
980
5.53k
  return prop_name;
981
5.53k
}
Unexecuted instantiation: zend_ast.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_attributes.c:zend_get_unmangled_property_name
zend_builtin_functions.c:zend_get_unmangled_property_name
Line
Count
Source
977
237
static zend_always_inline const char *zend_get_unmangled_property_name(const zend_string *mangled_prop) {
978
237
  const char *class_name, *prop_name;
979
  zend_unmangle_property_name(mangled_prop, &class_name, &prop_name);
980
237
  return prop_name;
981
237
}
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
977
833
static zend_always_inline const char *zend_get_unmangled_property_name(const zend_string *mangled_prop) {
978
833
  const char *class_name, *prop_name;
979
  zend_unmangle_property_name(mangled_prop, &class_name, &prop_name);
980
833
  return prop_name;
981
833
}
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
977
2.01k
static zend_always_inline const char *zend_get_unmangled_property_name(const zend_string *mangled_prop) {
978
2.01k
  const char *class_name, *prop_name;
979
  zend_unmangle_property_name(mangled_prop, &class_name, &prop_name);
980
2.01k
  return prop_name;
981
2.01k
}
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
977
265
static zend_always_inline const char *zend_get_unmangled_property_name(const zend_string *mangled_prop) {
978
265
  const char *class_name, *prop_name;
979
  zend_unmangle_property_name(mangled_prop, &class_name, &prop_name);
980
265
  return prop_name;
981
265
}
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
977
101
static zend_always_inline const char *zend_get_unmangled_property_name(const zend_string *mangled_prop) {
978
101
  const char *class_name, *prop_name;
979
  zend_unmangle_property_name(mangled_prop, &class_name, &prop_name);
980
101
  return prop_name;
981
101
}
Unexecuted instantiation: zend_signal.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_smart_str.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_stream.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_string.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_strtod.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_system_id.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_variables.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend_weakrefs.c:zend_get_unmangled_property_name
Unexecuted instantiation: zend.c:zend_get_unmangled_property_name
Unexecuted instantiation: internal_functions_cli.c:zend_get_unmangled_property_name
Unexecuted instantiation: fuzzer-parser.c:zend_get_unmangled_property_name
Unexecuted instantiation: fuzzer-sapi.c:zend_get_unmangled_property_name
Unexecuted instantiation: fuzzer-tracing-jit.c:zend_get_unmangled_property_name
Unexecuted instantiation: fuzzer-exif.c:zend_get_unmangled_property_name
Unexecuted instantiation: fuzzer-unserialize.c:zend_get_unmangled_property_name
Unexecuted instantiation: fuzzer-function-jit.c:zend_get_unmangled_property_name
Unexecuted instantiation: fuzzer-json.c:zend_get_unmangled_property_name
Unexecuted instantiation: fuzzer-unserializehash.c:zend_get_unmangled_property_name
Unexecuted instantiation: fuzzer-execute.c:zend_get_unmangled_property_name
982
983
5.26k
#define ZEND_FUNCTION_DTOR zend_function_dtor
984
0
#define ZEND_CLASS_DTOR destroy_zend_class
985
986
typedef bool (*zend_needs_live_range_cb)(zend_op_array *op_array, zend_op *opline);
987
ZEND_API void zend_recalc_live_ranges(
988
  zend_op_array *op_array, zend_needs_live_range_cb needs_live_range);
989
990
ZEND_API void pass_two(zend_op_array *op_array);
991
ZEND_API bool zend_is_compiling(void);
992
ZEND_API char *zend_make_compiled_string_description(const char *name);
993
ZEND_API void zend_initialize_class_data(zend_class_entry *ce, bool nullify_handlers);
994
uint32_t zend_get_class_fetch_type(const zend_string *name);
995
ZEND_API uint8_t zend_get_call_op(const zend_op *init_op, zend_function *fbc, bool result_used);
996
ZEND_API bool zend_is_smart_branch(const zend_op *opline);
997
998
typedef bool (*zend_auto_global_callback)(zend_string *name);
999
typedef struct _zend_auto_global {
1000
  zend_string *name;
1001
  zend_auto_global_callback auto_global_callback;
1002
  bool jit;
1003
  bool armed;
1004
} zend_auto_global;
1005
1006
ZEND_API zend_result zend_register_auto_global(zend_string *name, bool jit, zend_auto_global_callback auto_global_callback);
1007
ZEND_API void zend_activate_auto_globals(void);
1008
ZEND_API bool zend_is_auto_global(zend_string *name);
1009
ZEND_API bool zend_is_auto_global_str(const char *name, size_t len);
1010
ZEND_API size_t zend_dirname(char *path, size_t len);
1011
ZEND_API void zend_set_function_arg_flags(zend_function *func);
1012
1013
int ZEND_FASTCALL zendlex(zend_parser_stack_elem *elem);
1014
1015
void zend_assert_valid_class_name(const zend_string *const_name, const char *type);
1016
1017
zend_string *zend_type_to_string_resolved(zend_type type, zend_class_entry *scope);
1018
ZEND_API zend_string *zend_type_to_string(zend_type type);
1019
1020
/* BEGIN: OPCODES */
1021
1022
#include "zend_vm_opcodes.h"
1023
1024
/* END: OPCODES */
1025
1026
/* class fetches */
1027
5.25M
#define ZEND_FETCH_CLASS_DEFAULT  0
1028
47.1k
#define ZEND_FETCH_CLASS_SELF   1
1029
49.6k
#define ZEND_FETCH_CLASS_PARENT   2
1030
10.1k
#define ZEND_FETCH_CLASS_STATIC   3
1031
276
#define ZEND_FETCH_CLASS_AUTO   4
1032
6.55k
#define ZEND_FETCH_CLASS_INTERFACE  5
1033
3.71k
#define ZEND_FETCH_CLASS_TRAIT    6
1034
17.6k
#define ZEND_FETCH_CLASS_MASK        0x0f
1035
1.18M
#define ZEND_FETCH_CLASS_NO_AUTOLOAD 0x80
1036
449k
#define ZEND_FETCH_CLASS_SILENT      0x0100
1037
346k
#define ZEND_FETCH_CLASS_EXCEPTION   0x0200
1038
286k
#define ZEND_FETCH_CLASS_ALLOW_UNLINKED 0x0400
1039
6.65k
#define ZEND_FETCH_CLASS_ALLOW_NEARLY_LINKED 0x0800
1040
1041
/* These should not clash with ZEND_ACC_PPP_MASK and ZEND_ACC_PPP_SET_MASK */
1042
1.44M
#define ZEND_PARAM_REF      (1<<3)
1043
1.44M
#define ZEND_PARAM_VARIADIC (1<<4)
1044
1045
9.82M
#define ZEND_NAME_FQ       0
1046
1.83M
#define ZEND_NAME_NOT_FQ   1
1047
17.1M
#define ZEND_NAME_RELATIVE 2
1048
1049
/* ZEND_FETCH_ flags in class name AST of new const expression must not clash with ZEND_NAME_ flags */
1050
1.30k
#define ZEND_CONST_EXPR_NEW_FETCH_TYPE_SHIFT 2
1051
1052
426k
#define ZEND_TYPE_NULLABLE (1<<8)
1053
1054
2.75M
#define ZEND_ARRAY_SYNTAX_LIST 1  /* list() */
1055
7.59k
#define ZEND_ARRAY_SYNTAX_LONG 2  /* array() */
1056
107k
#define ZEND_ARRAY_SYNTAX_SHORT 3 /* [] */
1057
1058
/* var status for backpatching */
1059
5.11M
#define BP_VAR_R      0
1060
2.55M
#define BP_VAR_W      1
1061
2.00M
#define BP_VAR_RW     2
1062
45.5M
#define BP_VAR_IS     3
1063
454k
#define BP_VAR_FUNC_ARG   4
1064
938k
#define BP_VAR_UNSET    5
1065
1066
17.3M
#define ZEND_INTERNAL_FUNCTION    1
1067
2.89M
#define ZEND_USER_FUNCTION      2
1068
933k
#define ZEND_EVAL_CODE        4
1069
1070
19.9M
#define ZEND_USER_CODE(type)    ((type) != ZEND_INTERNAL_FUNCTION)
1071
1072
563k
#define ZEND_INTERNAL_CLASS         1
1073
181M
#define ZEND_USER_CLASS             2
1074
1075
4.74k
#define ZEND_EVAL       (1<<0)
1076
2.22k
#define ZEND_INCLUDE      (1<<1)
1077
139k
#define ZEND_INCLUDE_ONCE   (1<<2)
1078
1.14M
#define ZEND_REQUIRE      (1<<3)
1079
72.7k
#define ZEND_REQUIRE_ONCE   (1<<4)
1080
1081
/* global/local fetches */
1082
27.9k
#define ZEND_FETCH_GLOBAL   (1<<1)
1083
344k
#define ZEND_FETCH_LOCAL    (1<<2)
1084
58.1k
#define ZEND_FETCH_GLOBAL_LOCK  (1<<3)
1085
1086
#define ZEND_FETCH_TYPE_MASK  0xe
1087
1088
/* Only one of these can ever be in use */
1089
9.96k
#define ZEND_FETCH_REF      1
1090
6.17k
#define ZEND_FETCH_DIM_WRITE  2
1091
100k
#define ZEND_FETCH_OBJ_FLAGS  3
1092
1093
/* Used to mark what kind of operation a writing FETCH_DIM is used in,
1094
 * to produce a more precise error on incorrect string offset use. */
1095
6.70k
#define ZEND_FETCH_DIM_REF 1
1096
44.0k
#define ZEND_FETCH_DIM_DIM 2
1097
3.29k
#define ZEND_FETCH_DIM_OBJ 3
1098
540
#define ZEND_FETCH_DIM_INCDEC 4
1099
1100
10.4k
#define ZEND_ISEMPTY      (1<<0)
1101
1102
408k
#define ZEND_LAST_CATCH     (1<<0)
1103
1104
18.3k
#define ZEND_FREE_ON_RETURN     (1<<0)
1105
73.3k
#define ZEND_FREE_SWITCH        (1<<1)
1106
78.7k
#define ZEND_FREE_VOID_CAST     (1<<2)
1107
1108
0
#define ZEND_SEND_BY_VAL     0u
1109
2.32M
#define ZEND_SEND_BY_REF     1u
1110
2.21M
#define ZEND_SEND_PREFER_REF 2u
1111
1112
11.1k
#define ZEND_THROW_IS_EXPR 1u
1113
1114
7.71k
#define ZEND_FCALL_MAY_HAVE_EXTRA_NAMED_PARAMS 1
1115
1116
/* The send mode, the is_variadic, the is_promoted, and the is_tentative flags are stored as part of zend_type */
1117
831k
#define _ZEND_SEND_MODE_SHIFT _ZEND_TYPE_EXTRA_FLAGS_SHIFT
1118
32.9k
#define _ZEND_IS_VARIADIC_BIT (1 << (_ZEND_TYPE_EXTRA_FLAGS_SHIFT + 2))
1119
1.02k
#define _ZEND_IS_PROMOTED_BIT (1 << (_ZEND_TYPE_EXTRA_FLAGS_SHIFT + 3))
1120
1.59k
#define _ZEND_IS_TENTATIVE_BIT (1 << (_ZEND_TYPE_EXTRA_FLAGS_SHIFT + 4))
1121
#define ZEND_ARG_SEND_MODE(arg_info) \
1122
91.3k
  ((ZEND_TYPE_FULL_MASK((arg_info)->type) >> _ZEND_SEND_MODE_SHIFT) & 3)
1123
#define ZEND_ARG_IS_VARIADIC(arg_info) \
1124
31.8k
  ((ZEND_TYPE_FULL_MASK((arg_info)->type) & _ZEND_IS_VARIADIC_BIT) != 0)
1125
#define ZEND_ARG_IS_PROMOTED(arg_info) \
1126
  ((ZEND_TYPE_FULL_MASK((arg_info)->type) & _ZEND_IS_PROMOTED_BIT) != 0)
1127
#define ZEND_ARG_TYPE_IS_TENTATIVE(arg_info) \
1128
1.59k
  ((ZEND_TYPE_FULL_MASK((arg_info)->type) & _ZEND_IS_TENTATIVE_BIT) != 0)
1129
1130
1.15M
#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. */
1131
48.1k
#define ZEND_ALT_CASE_SYNTAX    (1 << 1) /* deprecated switch case terminated by semicolon */
1132
1133
/* Attributes for ${} encaps var in strings (ZEND_AST_DIM or ZEND_AST_VAR node) */
1134
/* ZEND_AST_VAR nodes can have any of the ZEND_ENCAPS_VAR_* flags */
1135
/* ZEND_AST_DIM flags can have ZEND_ENCAPS_VAR_DOLLAR_CURLY during the parse phase. */
1136
417k
#define ZEND_ENCAPS_VAR_DOLLAR_CURLY (1 << 0)
1137
417k
#define ZEND_ENCAPS_VAR_DOLLAR_CURLY_VAR_VAR (1 << 1)
1138
1139
/* Make sure these don't clash with ZEND_FETCH_CLASS_* flags. */
1140
#define IS_CONSTANT_CLASS                    0x400 /* __CLASS__ in trait */
1141
3.75M
#define IS_CONSTANT_UNQUALIFIED_IN_NAMESPACE 0x800
1142
1143
static zend_always_inline bool zend_check_arg_send_type(const zend_function *zf, uint32_t arg_num, uint32_t mask)
1144
2.37M
{
1145
2.37M
  arg_num--;
1146
2.37M
  if (UNEXPECTED(arg_num >= zf->common.num_args)) {
1147
1.49M
    if (EXPECTED((zf->common.fn_flags & ZEND_ACC_VARIADIC) == 0)) {
1148
1.21M
      return 0;
1149
1.21M
    }
1150
283k
    arg_num = zf->common.num_args;
1151
283k
  }
1152
1.16M
  return UNEXPECTED((ZEND_ARG_SEND_MODE(&zf->common.arg_info[arg_num]) & mask) != 0);
1153
2.37M
}
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
1144
3.36k
{
1145
3.36k
  arg_num--;
1146
3.36k
  if (UNEXPECTED(arg_num >= zf->common.num_args)) {
1147
139
    if (EXPECTED((zf->common.fn_flags & ZEND_ACC_VARIADIC) == 0)) {
1148
117
      return 0;
1149
117
    }
1150
22
    arg_num = zf->common.num_args;
1151
22
  }
1152
3.24k
  return UNEXPECTED((ZEND_ARG_SEND_MODE(&zf->common.arg_info[arg_num]) & mask) != 0);
1153
3.36k
}
Unexecuted instantiation: optimize_temp_vars_5.c:zend_check_arg_send_type
Unexecuted instantiation: pass1.c:zend_check_arg_send_type
Unexecuted instantiation: pass3.c:zend_check_arg_send_type
Unexecuted instantiation: sccp.c:zend_check_arg_send_type
Unexecuted instantiation: scdf.c:zend_check_arg_send_type
Unexecuted instantiation: zend_call_graph.c:zend_check_arg_send_type
Unexecuted instantiation: zend_cfg.c:zend_check_arg_send_type
Unexecuted instantiation: zend_dfg.c:zend_check_arg_send_type
Unexecuted instantiation: zend_dump.c:zend_check_arg_send_type
Unexecuted instantiation: zend_func_info.c:zend_check_arg_send_type
Unexecuted instantiation: zend_inference.c:zend_check_arg_send_type
Unexecuted instantiation: zend_optimizer.c:zend_check_arg_send_type
Unexecuted instantiation: zend_ssa.c:zend_check_arg_send_type
Unexecuted instantiation: zend_alloc.c:zend_check_arg_send_type
Unexecuted instantiation: zend_API.c:zend_check_arg_send_type
Unexecuted instantiation: zend_ast.c:zend_check_arg_send_type
Unexecuted instantiation: zend_attributes.c:zend_check_arg_send_type
Unexecuted instantiation: zend_builtin_functions.c:zend_check_arg_send_type
Unexecuted instantiation: zend_call_stack.c:zend_check_arg_send_type
Unexecuted instantiation: zend_closures.c:zend_check_arg_send_type
zend_compile.c:zend_check_arg_send_type
Line
Count
Source
1144
224k
{
1145
224k
  arg_num--;
1146
224k
  if (UNEXPECTED(arg_num >= zf->common.num_args)) {
1147
29.7k
    if (EXPECTED((zf->common.fn_flags & ZEND_ACC_VARIADIC) == 0)) {
1148
19.2k
      return 0;
1149
19.2k
    }
1150
10.4k
    arg_num = zf->common.num_args;
1151
10.4k
  }
1152
204k
  return UNEXPECTED((ZEND_ARG_SEND_MODE(&zf->common.arg_info[arg_num]) & mask) != 0);
1153
224k
}
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
1144
688k
{
1145
688k
  arg_num--;
1146
688k
  if (UNEXPECTED(arg_num >= zf->common.num_args)) {
1147
10.1k
    if (EXPECTED((zf->common.fn_flags & ZEND_ACC_VARIADIC) == 0)) {
1148
9.91k
      return 0;
1149
9.91k
    }
1150
234
    arg_num = zf->common.num_args;
1151
234
  }
1152
678k
  return UNEXPECTED((ZEND_ARG_SEND_MODE(&zf->common.arg_info[arg_num]) & mask) != 0);
1153
688k
}
zend_execute.c:zend_check_arg_send_type
Line
Count
Source
1144
1.45M
{
1145
1.45M
  arg_num--;
1146
1.45M
  if (UNEXPECTED(arg_num >= zf->common.num_args)) {
1147
1.45M
    if (EXPECTED((zf->common.fn_flags & ZEND_ACC_VARIADIC) == 0)) {
1148
1.18M
      return 0;
1149
1.18M
    }
1150
272k
    arg_num = zf->common.num_args;
1151
272k
  }
1152
275k
  return UNEXPECTED((ZEND_ARG_SEND_MODE(&zf->common.arg_info[arg_num]) & mask) != 0);
1153
1.45M
}
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
1154
1155
#define ARG_MUST_BE_SENT_BY_REF(zf, arg_num) \
1156
150k
  zend_check_arg_send_type(zf, arg_num, ZEND_SEND_BY_REF)
1157
1158
#define ARG_SHOULD_BE_SENT_BY_REF(zf, arg_num) \
1159
2.17M
  zend_check_arg_send_type(zf, arg_num, ZEND_SEND_BY_REF|ZEND_SEND_PREFER_REF)
1160
1161
#define ARG_MAY_BE_SENT_BY_REF(zf, arg_num) \
1162
42.8k
  zend_check_arg_send_type(zf, arg_num, ZEND_SEND_PREFER_REF)
1163
1164
/* Quick API to check first 12 arguments */
1165
2.51M
#define MAX_ARG_FLAG_NUM 12
1166
1167
#ifdef WORDS_BIGENDIAN
1168
# define ZEND_SET_ARG_FLAG(zf, arg_num, mask) do { \
1169
    (zf)->quick_arg_flags |= ((mask) << ((arg_num) - 1) * 2); \
1170
  } while (0)
1171
# define ZEND_CHECK_ARG_FLAG(zf, arg_num, mask) \
1172
  (((zf)->quick_arg_flags >> (((arg_num) - 1) * 2)) & (mask))
1173
#else
1174
751k
# define ZEND_SET_ARG_FLAG(zf, arg_num, mask) do { \
1175
751k
    (zf)->quick_arg_flags |= (((mask) << 6) << (arg_num) * 2); \
1176
751k
  } while (0)
1177
# define ZEND_CHECK_ARG_FLAG(zf, arg_num, mask) \
1178
904k
  (((zf)->quick_arg_flags >> (((arg_num) + 3) * 2)) & (mask))
1179
#endif
1180
1181
#define QUICK_ARG_MUST_BE_SENT_BY_REF(zf, arg_num) \
1182
82.9k
  ZEND_CHECK_ARG_FLAG(zf, arg_num, ZEND_SEND_BY_REF)
1183
1184
#define QUICK_ARG_SHOULD_BE_SENT_BY_REF(zf, arg_num) \
1185
821k
  ZEND_CHECK_ARG_FLAG(zf, arg_num, ZEND_SEND_BY_REF|ZEND_SEND_PREFER_REF)
1186
1187
#define QUICK_ARG_MAY_BE_SENT_BY_REF(zf, arg_num) \
1188
  ZEND_CHECK_ARG_FLAG(zf, arg_num, ZEND_SEND_PREFER_REF)
1189
1190
#define ZEND_RETURN_VAL 0
1191
#define ZEND_RETURN_REF 1
1192
1193
#define ZEND_BIND_VAL      0
1194
59.8k
#define ZEND_BIND_REF      1
1195
228k
#define ZEND_BIND_IMPLICIT 2
1196
14.7k
#define ZEND_BIND_EXPLICIT 4
1197
1198
27.7k
#define ZEND_RETURNS_FUNCTION (1<<0)
1199
2.61k
#define ZEND_RETURNS_VALUE    (1<<1)
1200
1201
76.4k
#define ZEND_ARRAY_ELEMENT_REF    (1<<0)
1202
10.1k
#define ZEND_ARRAY_NOT_PACKED   (1<<1)
1203
44.4k
#define ZEND_ARRAY_SIZE_SHIFT   2
1204
1205
/* Attribute for ternary inside parentheses */
1206
3.52k
#define ZEND_PARENTHESIZED_CONDITIONAL 1
1207
1208
/* Used to distinguish (parent::$prop)::get() from parent hook call. */
1209
2.52k
#define ZEND_PARENTHESIZED_STATIC_PROP 1
1210
1211
/* Used to disallow pipes with arrow functions that lead to confusing parse trees. */
1212
25.0k
#define ZEND_PARENTHESIZED_ARROW_FUNC 1
1213
1214
/* For "use" AST nodes and the seen symbol table */
1215
118k
#define ZEND_SYMBOL_CLASS    (1<<0)
1216
666k
#define ZEND_SYMBOL_FUNCTION (1<<1)
1217
9.01k
#define ZEND_SYMBOL_CONST    (1<<2)
1218
1219
/* All increment opcodes are even (decrement are odd) */
1220
3.50k
#define ZEND_IS_INCREMENT(opcode) (((opcode) & 1) == 0)
1221
1222
#define ZEND_IS_BINARY_ASSIGN_OP_OPCODE(opcode) \
1223
  (((opcode) >= ZEND_ADD) && ((opcode) <= ZEND_POW))
1224
1225
/* Pseudo-opcodes that are used only temporarily during compilation */
1226
5.29k
#define ZEND_GOTO  253
1227
3.10k
#define ZEND_BRK   254
1228
4.13k
#define ZEND_CONT  255
1229
1230
1231
END_EXTERN_C()
1232
1233
#define ZEND_CLONE_FUNC_NAME    "__clone"
1234
#define ZEND_CONSTRUCTOR_FUNC_NAME  "__construct"
1235
#define ZEND_DESTRUCTOR_FUNC_NAME "__destruct"
1236
#define ZEND_GET_FUNC_NAME          "__get"
1237
#define ZEND_SET_FUNC_NAME          "__set"
1238
#define ZEND_UNSET_FUNC_NAME        "__unset"
1239
#define ZEND_ISSET_FUNC_NAME        "__isset"
1240
#define ZEND_CALL_FUNC_NAME         "__call"
1241
#define ZEND_CALLSTATIC_FUNC_NAME   "__callstatic"
1242
#define ZEND_TOSTRING_FUNC_NAME     "__tostring"
1243
89
#define ZEND_INVOKE_FUNC_NAME       "__invoke"
1244
15
#define ZEND_DEBUGINFO_FUNC_NAME    "__debuginfo"
1245
1246
/* The following constants may be combined in CG(compiler_options)
1247
 * to change the default compiler behavior */
1248
1249
/* generate extended debug information */
1250
5.77M
#define ZEND_COMPILE_EXTENDED_STMT              (1<<0)
1251
3.91M
#define ZEND_COMPILE_EXTENDED_FCALL             (1<<1)
1252
#define ZEND_COMPILE_EXTENDED_INFO              (ZEND_COMPILE_EXTENDED_STMT|ZEND_COMPILE_EXTENDED_FCALL)
1253
1254
/* call op_array handler of extensions */
1255
876k
#define ZEND_COMPILE_HANDLE_OP_ARRAY            (1<<2)
1256
1257
/* generate ZEND_INIT_FCALL_BY_NAME for internal functions instead of ZEND_INIT_FCALL */
1258
321k
#define ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS  (1<<3)
1259
1260
/* don't perform early binding for classes inherited form internal ones;
1261
 * in namespaces assume that internal class that doesn't exist at compile-time
1262
 * may appear in run-time */
1263
4.50k
#define ZEND_COMPILE_IGNORE_INTERNAL_CLASSES    (1<<4)
1264
1265
/* generate ZEND_DECLARE_CLASS_DELAYED opcode to delay early binding */
1266
95.9k
#define ZEND_COMPILE_DELAYED_BINDING            (1<<5)
1267
1268
/* disable constant substitution at compile-time */
1269
116k
#define ZEND_COMPILE_NO_CONSTANT_SUBSTITUTION   (1<<6)
1270
1271
/* disable substitution of persistent constants at compile-time */
1272
22.3k
#define ZEND_COMPILE_NO_PERSISTENT_CONSTANT_SUBSTITUTION  (1<<8)
1273
1274
/* generate ZEND_INIT_FCALL_BY_NAME for userland functions instead of ZEND_INIT_FCALL */
1275
67.8k
#define ZEND_COMPILE_IGNORE_USER_FUNCTIONS      (1<<9)
1276
1277
/* force ZEND_ACC_USE_GUARDS for all classes */
1278
115k
#define ZEND_COMPILE_GUARDS           (1<<10)
1279
1280
/* disable builtin special case function calls */
1281
137k
#define ZEND_COMPILE_NO_BUILTINS        (1<<11)
1282
1283
/* result of compilation may be stored in file cache */
1284
0
#define ZEND_COMPILE_WITH_FILE_CACHE      (1<<12)
1285
1286
/* ignore functions and classes declared in other files */
1287
125k
#define ZEND_COMPILE_IGNORE_OTHER_FILES     (1<<13)
1288
1289
/* this flag is set when compiler invoked by opcache_compile_file() */
1290
98.8k
#define ZEND_COMPILE_WITHOUT_EXECUTION          (1<<14)
1291
1292
/* this flag is set when compiler invoked during preloading */
1293
1.11M
#define ZEND_COMPILE_PRELOAD                    (1<<15)
1294
1295
/* disable jumptable optimization for switch statements */
1296
3.28k
#define ZEND_COMPILE_NO_JUMPTABLES        (1<<16)
1297
1298
/* this flag is set when compiler invoked during preloading in separate process */
1299
0
#define ZEND_COMPILE_PRELOAD_IN_CHILD           (1<<17)
1300
1301
/* ignore observer notifications, e.g. to manually notify afterwards in a post-processing step after compilation */
1302
78.1k
#define ZEND_COMPILE_IGNORE_OBSERVER      (1<<18)
1303
1304
/* The default value for CG(compiler_options) */
1305
16
#define ZEND_COMPILE_DEFAULT          ZEND_COMPILE_HANDLE_OP_ARRAY
1306
1307
/* The default value for CG(compiler_options) during eval() */
1308
0
#define ZEND_COMPILE_DEFAULT_FOR_EVAL     0
1309
1310
ZEND_API bool zend_is_op_long_compatible(const zval *op);
1311
ZEND_API bool zend_binary_op_produces_error(uint32_t opcode, const zval *op1, const zval *op2);
1312
ZEND_API bool zend_unary_op_produces_error(uint32_t opcode, const zval *op);
1313
1314
bool zend_try_ct_eval_cast(zval *result, uint32_t type, zval *op1);
1315
1316
#endif /* ZEND_COMPILE_H */