Coverage Report

Created: 2026-09-14 06:25

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