Coverage Report

Created: 2025-06-13 06:43

/src/php-src/main/php.h
Line
Count
Source (jump to first uncovered line)
1
/*
2
   +----------------------------------------------------------------------+
3
   | Copyright (c) The PHP Group                                          |
4
   +----------------------------------------------------------------------+
5
   | This source file is subject to version 3.01 of the PHP license,      |
6
   | that is bundled with this package in the file LICENSE, and is        |
7
   | available through the world-wide-web at the following url:           |
8
   | https://www.php.net/license/3_01.txt                                 |
9
   | If you did not receive a copy of the PHP license and are unable to   |
10
   | obtain it through the world-wide-web, please send a note to          |
11
   | license@php.net so we can mail you a copy immediately.               |
12
   +----------------------------------------------------------------------+
13
   | Authors: Andi Gutmans <andi@php.net>                                 |
14
   |          Zeev Suraski <zeev@php.net>                                 |
15
   +----------------------------------------------------------------------+
16
 */
17
18
#ifndef PHP_H
19
#define PHP_H
20
21
#ifdef HAVE_DMALLOC
22
#include <dmalloc.h>
23
#endif
24
25
5
#define PHP_API_VERSION 20240925
26
#define PHP_HAVE_STREAMS
27
#define YYDEBUG 0
28
0
#define PHP_DEFAULT_CHARSET "UTF-8"
29
30
#include "php_version.h"
31
#include "zend.h"
32
#include "zend_sort.h"
33
#include "php_compat.h"
34
35
#include "zend_API.h"
36
37
#define php_sprintf sprintf
38
39
/* Operating system family definition */
40
#ifdef PHP_WIN32
41
# define PHP_OS_FAMILY      "Windows"
42
#elif defined(BSD) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
43
# define PHP_OS_FAMILY      "BSD"
44
#elif defined(__APPLE__) || defined(__MACH__)
45
# define PHP_OS_FAMILY      "Darwin"
46
#elif defined(__sun__)
47
# define PHP_OS_FAMILY      "Solaris"
48
#elif defined(__linux__)
49
# define PHP_OS_FAMILY      "Linux"
50
#else
51
# define PHP_OS_FAMILY      "Unknown"
52
#endif
53
54
/* PHP's DEBUG value must match Zend's ZEND_DEBUG value */
55
#undef PHP_DEBUG
56
#define PHP_DEBUG ZEND_DEBUG
57
58
#ifdef PHP_WIN32
59
# include "tsrm_win32.h"
60
# ifdef PHP_EXPORTS
61
#   define PHPAPI __declspec(dllexport)
62
# else
63
#   define PHPAPI __declspec(dllimport)
64
# endif
65
# define PHP_DIR_SEPARATOR '\\'
66
# define PHP_EOL "\r\n"
67
#else
68
# if defined(__GNUC__) && __GNUC__ >= 4
69
#   define PHPAPI __attribute__ ((visibility("default")))
70
# else
71
#   define PHPAPI
72
# endif
73
7.01k
# define PHP_DIR_SEPARATOR '/'
74
0
# define PHP_EOL "\n"
75
#endif
76
77
/* Windows specific defines */
78
#ifdef PHP_WIN32
79
# define PHP_PROG_SENDMAIL    "Built in mailer"
80
# define WIN32_LEAN_AND_MEAN
81
# define NOOPENFILE
82
83
# include <io.h>
84
# include <malloc.h>
85
# include <direct.h>
86
# include <stdlib.h>
87
# include <stdio.h>
88
# include <stdarg.h>
89
# include <sys/types.h>
90
# include <process.h>
91
92
typedef int uid_t;
93
typedef int gid_t;
94
typedef char * caddr_t;
95
typedef int pid_t;
96
97
# define M_TWOPI        (M_PI * 2.0)
98
# define off_t      _off_t
99
100
# define lstat(x, y)  php_sys_lstat(x, y)
101
# define chdir(path)  _chdir(path)
102
# define mkdir(a, b)  _mkdir(a)
103
# define rmdir(a)   _rmdir(a)
104
# define getpid     _getpid
105
# define php_sleep(t) SleepEx(t*1000, TRUE)
106
107
# ifndef getcwd
108
#  define getcwd(a, b)  _getcwd(a, b)
109
# endif
110
#endif
111
112
#include <assert.h>
113
114
#ifdef HAVE_UNIX_H
115
#include <unix.h>
116
#endif
117
118
#ifdef HAVE_ALLOCA_H
119
#include <alloca.h>
120
#endif
121
122
#ifdef HAVE_BUILD_DEFS_H
123
#include <build-defs.h>
124
#endif
125
126
/*
127
 * This is a fast version of strlcpy which should be used, if you
128
 * know the size of the destination buffer and if you know
129
 * the length of the source string.
130
 *
131
 * size is the allocated number of bytes of dst
132
 * src_size is the number of bytes excluding the NUL of src
133
 */
134
135
#define PHP_STRLCPY(dst, src, size, src_size) \
136
6
  {                     \
137
6
    size_t php_str_len;           \
138
6
                        \
139
6
    if (src_size >= size)         \
140
6
      php_str_len = size - 1;       \
141
6
    else                  \
142
6
      php_str_len = src_size;       \
143
6
    memcpy(dst, src, php_str_len);      \
144
6
    dst[php_str_len] = '\0';        \
145
6
  }
146
147
#ifndef HAVE_STRLCPY
148
BEGIN_EXTERN_C()
149
PHPAPI size_t php_strlcpy(char *dst, const char *src, size_t siz);
150
END_EXTERN_C()
151
#undef strlcpy
152
9.34k
#define strlcpy php_strlcpy
153
#define HAVE_STRLCPY 1
154
#define USE_STRLCPY_PHP_IMPL 1
155
#endif
156
157
#ifndef HAVE_STRLCAT
158
BEGIN_EXTERN_C()
159
PHPAPI size_t php_strlcat(char *dst, const char *src, size_t siz);
160
END_EXTERN_C()
161
#undef strlcat
162
48
#define strlcat php_strlcat
163
#define HAVE_STRLCAT 1
164
#define USE_STRLCAT_PHP_IMPL 1
165
#endif
166
167
#ifndef HAVE_EXPLICIT_BZERO
168
BEGIN_EXTERN_C()
169
PHPAPI void php_explicit_bzero(void *dst, size_t siz);
170
END_EXTERN_C()
171
#undef explicit_bzero
172
#define explicit_bzero php_explicit_bzero
173
#endif
174
175
BEGIN_EXTERN_C()
176
PHPAPI int php_safe_bcmp(const zend_string *a, const zend_string *b);
177
END_EXTERN_C()
178
179
#ifndef HAVE_STRTOK_R
180
BEGIN_EXTERN_C()
181
char *strtok_r(char *s, const char *delim, char **last);
182
END_EXTERN_C()
183
#endif
184
185
#ifndef HAVE_SOCKLEN_T
186
# ifdef PHP_WIN32
187
typedef int socklen_t;
188
# else
189
typedef unsigned int socklen_t;
190
# endif
191
#endif
192
193
#define CREATE_MUTEX(a, b)
194
#define SET_MUTEX(a)
195
#define FREE_MUTEX(a)
196
197
#include <stdlib.h>
198
#include <ctype.h>
199
#ifdef HAVE_UNISTD_H
200
#include <unistd.h>
201
#endif
202
203
#include <stdarg.h>
204
205
#include "zend_hash.h"
206
#include "zend_alloc.h"
207
#include "zend_stack.h"
208
#include <string.h>
209
210
#ifdef HAVE_PWD_H
211
# ifdef PHP_WIN32
212
#include "win32/param.h"
213
# else
214
#include <pwd.h>
215
#include <sys/param.h>
216
# endif
217
#endif
218
219
#include <limits.h>
220
221
#ifndef INT_MAX
222
#define INT_MAX 2147483647
223
#endif
224
225
#ifndef INT_MIN
226
#define INT_MIN (- INT_MAX - 1)
227
#endif
228
229
#define PHP_DOUBLE_MAX_LENGTH ZEND_DOUBLE_MAX_LENGTH
230
231
#define PHP_GCC_VERSION ZEND_GCC_VERSION
232
#define PHP_ATTRIBUTE_MALLOC ZEND_ATTRIBUTE_MALLOC
233
#define PHP_ATTRIBUTE_FORMAT ZEND_ATTRIBUTE_FORMAT
234
235
BEGIN_EXTERN_C()
236
#include "snprintf.h"
237
END_EXTERN_C()
238
#include "spprintf.h"
239
240
0
#define EXEC_INPUT_BUF 4096
241
242
#define PHP_MIME_TYPE "application/x-httpd-php"
243
244
/* macros */
245
3.28k
#define STR_PRINT(str)  ((str)?(str):"")
246
247
#ifndef MAXPATHLEN
248
# ifdef PHP_WIN32
249
#  include "win32/ioutil.h"
250
#  define MAXPATHLEN PHP_WIN32_IOUTIL_MAXPATHLEN
251
# elif PATH_MAX
252
#  define MAXPATHLEN PATH_MAX
253
# elif defined(MAX_PATH)
254
#  define MAXPATHLEN MAX_PATH
255
# else
256
#  define MAXPATHLEN 256    /* Should be safe for any weird systems that do not define it */
257
# endif
258
#endif
259
260
0
#define php_ignore_value(x) ZEND_IGNORE_VALUE(x)
261
262
/* global variables */
263
#ifndef PHP_WIN32
264
#define php_sleep sleep
265
extern char **environ;
266
#endif  /* ifndef PHP_WIN32 */
267
268
extern const char php_build_date[];
269
270
#ifdef PHP_PWRITE_64
271
ssize_t pwrite(int, void *, size_t, off64_t);
272
#endif
273
274
#ifdef PHP_PREAD_64
275
ssize_t pread(int, void *, size_t, off64_t);
276
#endif
277
278
BEGIN_EXTERN_C()
279
void phperror(char *error);
280
PHPAPI size_t php_write(void *buf, size_t size);
281
PHPAPI size_t php_printf(const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1, 2);
282
PHPAPI size_t php_printf_unchecked(const char *format, ...);
283
PHPAPI bool php_during_module_startup(void);
284
PHPAPI bool php_during_module_shutdown(void);
285
PHPAPI bool php_get_module_initialized(void);
286
#ifdef HAVE_SYSLOG_H
287
#include "php_syslog.h"
288
#define php_log_err(msg) php_log_err_with_severity(msg, LOG_NOTICE)
289
#else
290
#define php_log_err(msg) php_log_err_with_severity(msg, 5)
291
#endif
292
PHPAPI ZEND_COLD void php_log_err_with_severity(const char *log_message, int syslog_type_int);
293
int Debug(char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1, 2);
294
int cfgparse(void);
295
END_EXTERN_C()
296
297
0
#define php_error zend_error
298
#define error_handling_t zend_error_handling_t
299
300
BEGIN_EXTERN_C()
301
static inline ZEND_ATTRIBUTE_DEPRECATED void php_set_error_handling(error_handling_t error_handling, zend_class_entry *exception_class)
302
0
{
303
0
  zend_replace_error_handling(error_handling, exception_class, NULL);
304
0
}
Unexecuted instantiation: php_date.c:php_set_error_handling
Unexecuted instantiation: php_pcre.c:php_set_error_handling
Unexecuted instantiation: exif.c:php_set_error_handling
Unexecuted instantiation: hash_adler32.c:php_set_error_handling
Unexecuted instantiation: hash_crc32.c:php_set_error_handling
Unexecuted instantiation: hash_fnv.c:php_set_error_handling
Unexecuted instantiation: hash_gost.c:php_set_error_handling
Unexecuted instantiation: hash_haval.c:php_set_error_handling
Unexecuted instantiation: hash_joaat.c:php_set_error_handling
Unexecuted instantiation: hash_md.c:php_set_error_handling
Unexecuted instantiation: hash_murmur.c:php_set_error_handling
Unexecuted instantiation: hash_ripemd.c:php_set_error_handling
Unexecuted instantiation: hash_sha_ni.c:php_set_error_handling
Unexecuted instantiation: hash_sha_sse2.c:php_set_error_handling
Unexecuted instantiation: hash_sha.c:php_set_error_handling
Unexecuted instantiation: hash_sha3.c:php_set_error_handling
Unexecuted instantiation: hash_snefru.c:php_set_error_handling
Unexecuted instantiation: hash_tiger.c:php_set_error_handling
Unexecuted instantiation: hash_whirlpool.c:php_set_error_handling
Unexecuted instantiation: hash_xxhash.c:php_set_error_handling
Unexecuted instantiation: hash.c:php_set_error_handling
Unexecuted instantiation: json_encoder.c:php_set_error_handling
Unexecuted instantiation: json_parser.tab.c:php_set_error_handling
Unexecuted instantiation: json_scanner.c:php_set_error_handling
Unexecuted instantiation: json.c:php_set_error_handling
Unexecuted instantiation: php_lexbor.c:php_set_error_handling
Unexecuted instantiation: csprng.c:php_set_error_handling
Unexecuted instantiation: engine_mt19937.c:php_set_error_handling
Unexecuted instantiation: engine_pcgoneseq128xslrr64.c:php_set_error_handling
Unexecuted instantiation: engine_secure.c:php_set_error_handling
Unexecuted instantiation: engine_user.c:php_set_error_handling
Unexecuted instantiation: engine_xoshiro256starstar.c:php_set_error_handling
Unexecuted instantiation: gammasection.c:php_set_error_handling
Unexecuted instantiation: random.c:php_set_error_handling
Unexecuted instantiation: randomizer.c:php_set_error_handling
Unexecuted instantiation: zend_utils.c:php_set_error_handling
Unexecuted instantiation: php_reflection.c:php_set_error_handling
Unexecuted instantiation: php_spl.c:php_set_error_handling
Unexecuted instantiation: spl_array.c:php_set_error_handling
Unexecuted instantiation: spl_directory.c:php_set_error_handling
Unexecuted instantiation: spl_dllist.c:php_set_error_handling
Unexecuted instantiation: spl_exceptions.c:php_set_error_handling
Unexecuted instantiation: spl_fixedarray.c:php_set_error_handling
Unexecuted instantiation: spl_functions.c:php_set_error_handling
Unexecuted instantiation: spl_heap.c:php_set_error_handling
Unexecuted instantiation: spl_iterators.c:php_set_error_handling
Unexecuted instantiation: spl_observer.c:php_set_error_handling
Unexecuted instantiation: array.c:php_set_error_handling
Unexecuted instantiation: assert.c:php_set_error_handling
Unexecuted instantiation: base64.c:php_set_error_handling
Unexecuted instantiation: basic_functions.c:php_set_error_handling
Unexecuted instantiation: browscap.c:php_set_error_handling
Unexecuted instantiation: crc32_x86.c:php_set_error_handling
Unexecuted instantiation: crc32.c:php_set_error_handling
Unexecuted instantiation: credits.c:php_set_error_handling
Unexecuted instantiation: crypt.c:php_set_error_handling
Unexecuted instantiation: css.c:php_set_error_handling
Unexecuted instantiation: datetime.c:php_set_error_handling
Unexecuted instantiation: dir.c:php_set_error_handling
Unexecuted instantiation: dl.c:php_set_error_handling
Unexecuted instantiation: dns.c:php_set_error_handling
Unexecuted instantiation: exec.c:php_set_error_handling
Unexecuted instantiation: file.c:php_set_error_handling
Unexecuted instantiation: filestat.c:php_set_error_handling
Unexecuted instantiation: filters.c:php_set_error_handling
Unexecuted instantiation: flock_compat.c:php_set_error_handling
Unexecuted instantiation: formatted_print.c:php_set_error_handling
Unexecuted instantiation: fsock.c:php_set_error_handling
Unexecuted instantiation: ftok.c:php_set_error_handling
Unexecuted instantiation: ftp_fopen_wrapper.c:php_set_error_handling
Unexecuted instantiation: head.c:php_set_error_handling
Unexecuted instantiation: hrtime.c:php_set_error_handling
Unexecuted instantiation: html.c:php_set_error_handling
Unexecuted instantiation: http_fopen_wrapper.c:php_set_error_handling
Unexecuted instantiation: http.c:php_set_error_handling
Unexecuted instantiation: image.c:php_set_error_handling
Unexecuted instantiation: incomplete_class.c:php_set_error_handling
Unexecuted instantiation: info.c:php_set_error_handling
Unexecuted instantiation: iptc.c:php_set_error_handling
Unexecuted instantiation: levenshtein.c:php_set_error_handling
Unexecuted instantiation: link.c:php_set_error_handling
Unexecuted instantiation: mail.c:php_set_error_handling
Unexecuted instantiation: math.c:php_set_error_handling
Unexecuted instantiation: md5.c:php_set_error_handling
Unexecuted instantiation: metaphone.c:php_set_error_handling
Unexecuted instantiation: microtime.c:php_set_error_handling
Unexecuted instantiation: net.c:php_set_error_handling
Unexecuted instantiation: pack.c:php_set_error_handling
Unexecuted instantiation: pageinfo.c:php_set_error_handling
Unexecuted instantiation: password.c:php_set_error_handling
Unexecuted instantiation: php_fopen_wrapper.c:php_set_error_handling
Unexecuted instantiation: proc_open.c:php_set_error_handling
Unexecuted instantiation: quot_print.c:php_set_error_handling
Unexecuted instantiation: scanf.c:php_set_error_handling
Unexecuted instantiation: sha1.c:php_set_error_handling
Unexecuted instantiation: soundex.c:php_set_error_handling
Unexecuted instantiation: streamsfuncs.c:php_set_error_handling
Unexecuted instantiation: string.c:php_set_error_handling
Unexecuted instantiation: strnatcmp.c:php_set_error_handling
Unexecuted instantiation: syslog.c:php_set_error_handling
Unexecuted instantiation: type.c:php_set_error_handling
Unexecuted instantiation: uniqid.c:php_set_error_handling
Unexecuted instantiation: url_scanner_ex.c:php_set_error_handling
Unexecuted instantiation: url.c:php_set_error_handling
Unexecuted instantiation: user_filters.c:php_set_error_handling
Unexecuted instantiation: uuencode.c:php_set_error_handling
Unexecuted instantiation: var_unserializer.c:php_set_error_handling
Unexecuted instantiation: var.c:php_set_error_handling
Unexecuted instantiation: versioning.c:php_set_error_handling
Unexecuted instantiation: crypt_sha256.c:php_set_error_handling
Unexecuted instantiation: crypt_sha512.c:php_set_error_handling
Unexecuted instantiation: php_crypt_r.c:php_set_error_handling
Unexecuted instantiation: php_uri.c:php_set_error_handling
Unexecuted instantiation: php_uri_common.c:php_set_error_handling
Unexecuted instantiation: explicit_bzero.c:php_set_error_handling
Unexecuted instantiation: fopen_wrappers.c:php_set_error_handling
Unexecuted instantiation: getopt.c:php_set_error_handling
Unexecuted instantiation: main.c:php_set_error_handling
Unexecuted instantiation: network.c:php_set_error_handling
Unexecuted instantiation: output.c:php_set_error_handling
Unexecuted instantiation: php_content_types.c:php_set_error_handling
Unexecuted instantiation: php_ini_builder.c:php_set_error_handling
Unexecuted instantiation: php_ini.c:php_set_error_handling
Unexecuted instantiation: php_glob.c:php_set_error_handling
Unexecuted instantiation: php_odbc_utils.c:php_set_error_handling
Unexecuted instantiation: php_open_temporary_file.c:php_set_error_handling
Unexecuted instantiation: php_scandir.c:php_set_error_handling
Unexecuted instantiation: php_syslog.c:php_set_error_handling
Unexecuted instantiation: php_ticks.c:php_set_error_handling
Unexecuted instantiation: php_variables.c:php_set_error_handling
Unexecuted instantiation: reentrancy.c:php_set_error_handling
Unexecuted instantiation: rfc1867.c:php_set_error_handling
Unexecuted instantiation: safe_bcmp.c:php_set_error_handling
Unexecuted instantiation: SAPI.c:php_set_error_handling
Unexecuted instantiation: snprintf.c:php_set_error_handling
Unexecuted instantiation: spprintf.c:php_set_error_handling
Unexecuted instantiation: strlcat.c:php_set_error_handling
Unexecuted instantiation: strlcpy.c:php_set_error_handling
Unexecuted instantiation: cast.c:php_set_error_handling
Unexecuted instantiation: filter.c:php_set_error_handling
Unexecuted instantiation: glob_wrapper.c:php_set_error_handling
Unexecuted instantiation: memory.c:php_set_error_handling
Unexecuted instantiation: mmap.c:php_set_error_handling
Unexecuted instantiation: plain_wrapper.c:php_set_error_handling
Unexecuted instantiation: streams.c:php_set_error_handling
Unexecuted instantiation: transports.c:php_set_error_handling
Unexecuted instantiation: userspace.c:php_set_error_handling
Unexecuted instantiation: xp_socket.c:php_set_error_handling
Unexecuted instantiation: zend_optimizer.c:php_set_error_handling
Unexecuted instantiation: zend_system_id.c:php_set_error_handling
Unexecuted instantiation: zend.c:php_set_error_handling
Unexecuted instantiation: internal_functions_cli.c:php_set_error_handling
Unexecuted instantiation: fuzzer-parser.c:php_set_error_handling
Unexecuted instantiation: fuzzer-sapi.c:php_set_error_handling
Unexecuted instantiation: fuzzer-tracing-jit.c:php_set_error_handling
Unexecuted instantiation: fuzzer-exif.c:php_set_error_handling
Unexecuted instantiation: fuzzer-unserialize.c:php_set_error_handling
Unexecuted instantiation: fuzzer-function-jit.c:php_set_error_handling
Unexecuted instantiation: fuzzer-json.c:php_set_error_handling
Unexecuted instantiation: fuzzer-unserializehash.c:php_set_error_handling
Unexecuted instantiation: fuzzer-execute.c:php_set_error_handling
305
0
static inline ZEND_ATTRIBUTE_DEPRECATED void php_std_error_handling(void) {}
Unexecuted instantiation: php_date.c:php_std_error_handling
Unexecuted instantiation: php_pcre.c:php_std_error_handling
Unexecuted instantiation: exif.c:php_std_error_handling
Unexecuted instantiation: hash_adler32.c:php_std_error_handling
Unexecuted instantiation: hash_crc32.c:php_std_error_handling
Unexecuted instantiation: hash_fnv.c:php_std_error_handling
Unexecuted instantiation: hash_gost.c:php_std_error_handling
Unexecuted instantiation: hash_haval.c:php_std_error_handling
Unexecuted instantiation: hash_joaat.c:php_std_error_handling
Unexecuted instantiation: hash_md.c:php_std_error_handling
Unexecuted instantiation: hash_murmur.c:php_std_error_handling
Unexecuted instantiation: hash_ripemd.c:php_std_error_handling
Unexecuted instantiation: hash_sha_ni.c:php_std_error_handling
Unexecuted instantiation: hash_sha_sse2.c:php_std_error_handling
Unexecuted instantiation: hash_sha.c:php_std_error_handling
Unexecuted instantiation: hash_sha3.c:php_std_error_handling
Unexecuted instantiation: hash_snefru.c:php_std_error_handling
Unexecuted instantiation: hash_tiger.c:php_std_error_handling
Unexecuted instantiation: hash_whirlpool.c:php_std_error_handling
Unexecuted instantiation: hash_xxhash.c:php_std_error_handling
Unexecuted instantiation: hash.c:php_std_error_handling
Unexecuted instantiation: json_encoder.c:php_std_error_handling
Unexecuted instantiation: json_parser.tab.c:php_std_error_handling
Unexecuted instantiation: json_scanner.c:php_std_error_handling
Unexecuted instantiation: json.c:php_std_error_handling
Unexecuted instantiation: php_lexbor.c:php_std_error_handling
Unexecuted instantiation: csprng.c:php_std_error_handling
Unexecuted instantiation: engine_mt19937.c:php_std_error_handling
Unexecuted instantiation: engine_pcgoneseq128xslrr64.c:php_std_error_handling
Unexecuted instantiation: engine_secure.c:php_std_error_handling
Unexecuted instantiation: engine_user.c:php_std_error_handling
Unexecuted instantiation: engine_xoshiro256starstar.c:php_std_error_handling
Unexecuted instantiation: gammasection.c:php_std_error_handling
Unexecuted instantiation: random.c:php_std_error_handling
Unexecuted instantiation: randomizer.c:php_std_error_handling
Unexecuted instantiation: zend_utils.c:php_std_error_handling
Unexecuted instantiation: php_reflection.c:php_std_error_handling
Unexecuted instantiation: php_spl.c:php_std_error_handling
Unexecuted instantiation: spl_array.c:php_std_error_handling
Unexecuted instantiation: spl_directory.c:php_std_error_handling
Unexecuted instantiation: spl_dllist.c:php_std_error_handling
Unexecuted instantiation: spl_exceptions.c:php_std_error_handling
Unexecuted instantiation: spl_fixedarray.c:php_std_error_handling
Unexecuted instantiation: spl_functions.c:php_std_error_handling
Unexecuted instantiation: spl_heap.c:php_std_error_handling
Unexecuted instantiation: spl_iterators.c:php_std_error_handling
Unexecuted instantiation: spl_observer.c:php_std_error_handling
Unexecuted instantiation: array.c:php_std_error_handling
Unexecuted instantiation: assert.c:php_std_error_handling
Unexecuted instantiation: base64.c:php_std_error_handling
Unexecuted instantiation: basic_functions.c:php_std_error_handling
Unexecuted instantiation: browscap.c:php_std_error_handling
Unexecuted instantiation: crc32_x86.c:php_std_error_handling
Unexecuted instantiation: crc32.c:php_std_error_handling
Unexecuted instantiation: credits.c:php_std_error_handling
Unexecuted instantiation: crypt.c:php_std_error_handling
Unexecuted instantiation: css.c:php_std_error_handling
Unexecuted instantiation: datetime.c:php_std_error_handling
Unexecuted instantiation: dir.c:php_std_error_handling
Unexecuted instantiation: dl.c:php_std_error_handling
Unexecuted instantiation: dns.c:php_std_error_handling
Unexecuted instantiation: exec.c:php_std_error_handling
Unexecuted instantiation: file.c:php_std_error_handling
Unexecuted instantiation: filestat.c:php_std_error_handling
Unexecuted instantiation: filters.c:php_std_error_handling
Unexecuted instantiation: flock_compat.c:php_std_error_handling
Unexecuted instantiation: formatted_print.c:php_std_error_handling
Unexecuted instantiation: fsock.c:php_std_error_handling
Unexecuted instantiation: ftok.c:php_std_error_handling
Unexecuted instantiation: ftp_fopen_wrapper.c:php_std_error_handling
Unexecuted instantiation: head.c:php_std_error_handling
Unexecuted instantiation: hrtime.c:php_std_error_handling
Unexecuted instantiation: html.c:php_std_error_handling
Unexecuted instantiation: http_fopen_wrapper.c:php_std_error_handling
Unexecuted instantiation: http.c:php_std_error_handling
Unexecuted instantiation: image.c:php_std_error_handling
Unexecuted instantiation: incomplete_class.c:php_std_error_handling
Unexecuted instantiation: info.c:php_std_error_handling
Unexecuted instantiation: iptc.c:php_std_error_handling
Unexecuted instantiation: levenshtein.c:php_std_error_handling
Unexecuted instantiation: link.c:php_std_error_handling
Unexecuted instantiation: mail.c:php_std_error_handling
Unexecuted instantiation: math.c:php_std_error_handling
Unexecuted instantiation: md5.c:php_std_error_handling
Unexecuted instantiation: metaphone.c:php_std_error_handling
Unexecuted instantiation: microtime.c:php_std_error_handling
Unexecuted instantiation: net.c:php_std_error_handling
Unexecuted instantiation: pack.c:php_std_error_handling
Unexecuted instantiation: pageinfo.c:php_std_error_handling
Unexecuted instantiation: password.c:php_std_error_handling
Unexecuted instantiation: php_fopen_wrapper.c:php_std_error_handling
Unexecuted instantiation: proc_open.c:php_std_error_handling
Unexecuted instantiation: quot_print.c:php_std_error_handling
Unexecuted instantiation: scanf.c:php_std_error_handling
Unexecuted instantiation: sha1.c:php_std_error_handling
Unexecuted instantiation: soundex.c:php_std_error_handling
Unexecuted instantiation: streamsfuncs.c:php_std_error_handling
Unexecuted instantiation: string.c:php_std_error_handling
Unexecuted instantiation: strnatcmp.c:php_std_error_handling
Unexecuted instantiation: syslog.c:php_std_error_handling
Unexecuted instantiation: type.c:php_std_error_handling
Unexecuted instantiation: uniqid.c:php_std_error_handling
Unexecuted instantiation: url_scanner_ex.c:php_std_error_handling
Unexecuted instantiation: url.c:php_std_error_handling
Unexecuted instantiation: user_filters.c:php_std_error_handling
Unexecuted instantiation: uuencode.c:php_std_error_handling
Unexecuted instantiation: var_unserializer.c:php_std_error_handling
Unexecuted instantiation: var.c:php_std_error_handling
Unexecuted instantiation: versioning.c:php_std_error_handling
Unexecuted instantiation: crypt_sha256.c:php_std_error_handling
Unexecuted instantiation: crypt_sha512.c:php_std_error_handling
Unexecuted instantiation: php_crypt_r.c:php_std_error_handling
Unexecuted instantiation: php_uri.c:php_std_error_handling
Unexecuted instantiation: php_uri_common.c:php_std_error_handling
Unexecuted instantiation: explicit_bzero.c:php_std_error_handling
Unexecuted instantiation: fopen_wrappers.c:php_std_error_handling
Unexecuted instantiation: getopt.c:php_std_error_handling
Unexecuted instantiation: main.c:php_std_error_handling
Unexecuted instantiation: network.c:php_std_error_handling
Unexecuted instantiation: output.c:php_std_error_handling
Unexecuted instantiation: php_content_types.c:php_std_error_handling
Unexecuted instantiation: php_ini_builder.c:php_std_error_handling
Unexecuted instantiation: php_ini.c:php_std_error_handling
Unexecuted instantiation: php_glob.c:php_std_error_handling
Unexecuted instantiation: php_odbc_utils.c:php_std_error_handling
Unexecuted instantiation: php_open_temporary_file.c:php_std_error_handling
Unexecuted instantiation: php_scandir.c:php_std_error_handling
Unexecuted instantiation: php_syslog.c:php_std_error_handling
Unexecuted instantiation: php_ticks.c:php_std_error_handling
Unexecuted instantiation: php_variables.c:php_std_error_handling
Unexecuted instantiation: reentrancy.c:php_std_error_handling
Unexecuted instantiation: rfc1867.c:php_std_error_handling
Unexecuted instantiation: safe_bcmp.c:php_std_error_handling
Unexecuted instantiation: SAPI.c:php_std_error_handling
Unexecuted instantiation: snprintf.c:php_std_error_handling
Unexecuted instantiation: spprintf.c:php_std_error_handling
Unexecuted instantiation: strlcat.c:php_std_error_handling
Unexecuted instantiation: strlcpy.c:php_std_error_handling
Unexecuted instantiation: cast.c:php_std_error_handling
Unexecuted instantiation: filter.c:php_std_error_handling
Unexecuted instantiation: glob_wrapper.c:php_std_error_handling
Unexecuted instantiation: memory.c:php_std_error_handling
Unexecuted instantiation: mmap.c:php_std_error_handling
Unexecuted instantiation: plain_wrapper.c:php_std_error_handling
Unexecuted instantiation: streams.c:php_std_error_handling
Unexecuted instantiation: transports.c:php_std_error_handling
Unexecuted instantiation: userspace.c:php_std_error_handling
Unexecuted instantiation: xp_socket.c:php_std_error_handling
Unexecuted instantiation: zend_optimizer.c:php_std_error_handling
Unexecuted instantiation: zend_system_id.c:php_std_error_handling
Unexecuted instantiation: zend.c:php_std_error_handling
Unexecuted instantiation: internal_functions_cli.c:php_std_error_handling
Unexecuted instantiation: fuzzer-parser.c:php_std_error_handling
Unexecuted instantiation: fuzzer-sapi.c:php_std_error_handling
Unexecuted instantiation: fuzzer-tracing-jit.c:php_std_error_handling
Unexecuted instantiation: fuzzer-exif.c:php_std_error_handling
Unexecuted instantiation: fuzzer-unserialize.c:php_std_error_handling
Unexecuted instantiation: fuzzer-function-jit.c:php_std_error_handling
Unexecuted instantiation: fuzzer-json.c:php_std_error_handling
Unexecuted instantiation: fuzzer-unserializehash.c:php_std_error_handling
Unexecuted instantiation: fuzzer-execute.c:php_std_error_handling
306
307
PHPAPI ZEND_COLD void php_verror(const char *docref, const char *params, int type, const char *format, va_list args) PHP_ATTRIBUTE_FORMAT(printf, 4, 0);
308
309
/* PHPAPI void php_error(int type, const char *format, ...); */
310
PHPAPI ZEND_COLD void php_error_docref(const char *docref, int type, const char *format, ...)
311
  PHP_ATTRIBUTE_FORMAT(printf, 3, 4);
312
PHPAPI ZEND_COLD void php_error_docref_unchecked(const char *docref, int type, const char *format, ...);
313
PHPAPI ZEND_COLD void php_error_docref1(const char *docref, const char *param1, int type, const char *format, ...)
314
  PHP_ATTRIBUTE_FORMAT(printf, 4, 5);
315
PHPAPI ZEND_COLD void php_error_docref2(const char *docref, const char *param1, const char *param2, int type, const char *format, ...)
316
  PHP_ATTRIBUTE_FORMAT(printf, 5, 6);
317
#ifdef PHP_WIN32
318
PHPAPI ZEND_COLD void php_win32_docref1_from_error(DWORD error, const char *param1);
319
PHPAPI ZEND_COLD void php_win32_docref2_from_error(DWORD error, const char *param1, const char *param2);
320
#endif
321
END_EXTERN_C()
322
323
#define zenderror phperror
324
#define zendlex phplex
325
326
#define phpparse zendparse
327
#define phprestart zendrestart
328
#define phpin zendin
329
330
3.29k
#define php_memnstr zend_memnstr
331
552
#define php_memnistr zend_memnistr
332
333
/* functions */
334
BEGIN_EXTERN_C()
335
PHPAPI extern int (*php_register_internal_extensions_func)(void);
336
PHPAPI int php_register_internal_extensions(void);
337
PHPAPI void php_register_pre_request_shutdown(void (*func)(void *), void *userdata);
338
PHPAPI void php_com_initialize(void);
339
PHPAPI char *php_get_current_user(void);
340
341
PHPAPI const char *php_get_internal_encoding(void);
342
PHPAPI const char *php_get_input_encoding(void);
343
PHPAPI const char *php_get_output_encoding(void);
344
PHPAPI extern void (*php_internal_encoding_changed)(void);
345
END_EXTERN_C()
346
347
/* PHP-named Zend macro wrappers */
348
#define PHP_FN          ZEND_FN
349
#define PHP_MN          ZEND_MN
350
#define PHP_NAMED_FUNCTION    ZEND_NAMED_FUNCTION
351
#define PHP_FUNCTION      ZEND_FUNCTION
352
#define PHP_METHOD        ZEND_METHOD
353
354
#define PHP_RAW_NAMED_FE ZEND_RAW_NAMED_FE
355
#define PHP_NAMED_FE  ZEND_NAMED_FE
356
#define PHP_FE      ZEND_FE
357
#define PHP_DEP_FE      ZEND_DEP_FE
358
#define PHP_FALIAS    ZEND_FALIAS
359
#define PHP_DEP_FALIAS  ZEND_DEP_FALIAS
360
#define PHP_ME          ZEND_ME
361
#define PHP_MALIAS      ZEND_MALIAS
362
#define PHP_ABSTRACT_ME ZEND_ABSTRACT_ME
363
#define PHP_ME_MAPPING  ZEND_ME_MAPPING
364
#define PHP_FE_END      ZEND_FE_END
365
366
#define PHP_MODULE_STARTUP_N  ZEND_MODULE_STARTUP_N
367
#define PHP_MODULE_SHUTDOWN_N ZEND_MODULE_SHUTDOWN_N
368
#define PHP_MODULE_ACTIVATE_N ZEND_MODULE_ACTIVATE_N
369
#define PHP_MODULE_DEACTIVATE_N ZEND_MODULE_DEACTIVATE_N
370
#define PHP_MODULE_INFO_N   ZEND_MODULE_INFO_N
371
372
#define PHP_MODULE_STARTUP_D  ZEND_MODULE_STARTUP_D
373
#define PHP_MODULE_SHUTDOWN_D ZEND_MODULE_SHUTDOWN_D
374
#define PHP_MODULE_ACTIVATE_D ZEND_MODULE_ACTIVATE_D
375
#define PHP_MODULE_DEACTIVATE_D ZEND_MODULE_DEACTIVATE_D
376
#define PHP_MODULE_INFO_D   ZEND_MODULE_INFO_D
377
378
/* Compatibility macros */
379
400
#define PHP_MINIT   ZEND_MODULE_STARTUP_N
380
0
#define PHP_MSHUTDOWN ZEND_MODULE_SHUTDOWN_N
381
900k
#define PHP_RINIT   ZEND_MODULE_ACTIVATE_N
382
2.10M
#define PHP_RSHUTDOWN ZEND_MODULE_DEACTIVATE_N
383
31
#define PHP_MINFO   ZEND_MODULE_INFO_N
384
#define PHP_GINIT   ZEND_GINIT
385
#define PHP_GSHUTDOWN ZEND_GSHUTDOWN
386
387
#define PHP_MINIT_FUNCTION    ZEND_MODULE_STARTUP_D
388
#define PHP_MSHUTDOWN_FUNCTION  ZEND_MODULE_SHUTDOWN_D
389
#define PHP_RINIT_FUNCTION    ZEND_MODULE_ACTIVATE_D
390
#define PHP_RSHUTDOWN_FUNCTION  ZEND_MODULE_DEACTIVATE_D
391
#define PHP_MINFO_FUNCTION    ZEND_MODULE_INFO_D
392
#define PHP_GINIT_FUNCTION    ZEND_GINIT_FUNCTION
393
#define PHP_GSHUTDOWN_FUNCTION  ZEND_GSHUTDOWN_FUNCTION
394
395
#define PHP_MODULE_GLOBALS    ZEND_MODULE_GLOBALS
396
397
398
/* Output support */
399
#include "main/php_output.h"
400
401
402
#include "php_streams.h"
403
#include "php_memory_streams.h"
404
#include "fopen_wrappers.h"
405
406
407
/* Virtual current working directory support */
408
#include "zend_virtual_cwd.h"
409
410
#include "zend_constants.h"
411
412
/* connection status states */
413
300k
#define PHP_CONNECTION_NORMAL  0
414
0
#define PHP_CONNECTION_ABORTED 1
415
0
#define PHP_CONNECTION_TIMEOUT 2
416
417
#include "php_reentrancy.h"
418
419
/* the following typedefs are deprecated and will be removed in PHP
420
 * 9.0; use the standard C99 types instead */
421
typedef bool zend_bool;
422
typedef intptr_t zend_intptr_t;
423
typedef uintptr_t zend_uintptr_t;
424
425
#endif