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 | | | http://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 | 0 | #define PHP_API_VERSION 20190128 |
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 | | # define THREAD_LS |
74 | 0 | # define PHP_DIR_SEPARATOR '/' |
75 | 0 | # define PHP_EOL "\n" |
76 | | #endif |
77 | | |
78 | | /* Windows specific defines */ |
79 | | #ifdef PHP_WIN32 |
80 | | # define PHP_PROG_SENDMAIL "Built in mailer" |
81 | | # define WIN32_LEAN_AND_MEAN |
82 | | # define NOOPENFILE |
83 | | |
84 | | # include <io.h> |
85 | | # include <malloc.h> |
86 | | # include <direct.h> |
87 | | # include <stdlib.h> |
88 | | # include <stdio.h> |
89 | | # include <stdarg.h> |
90 | | # include <sys/types.h> |
91 | | # include <process.h> |
92 | | |
93 | | typedef int uid_t; |
94 | | typedef int gid_t; |
95 | | typedef char * caddr_t; |
96 | | typedef int pid_t; |
97 | | |
98 | | # ifndef PHP_DEBUG |
99 | | # ifdef inline |
100 | | # undef inline |
101 | | # endif |
102 | | # define inline __inline |
103 | | # endif |
104 | | |
105 | | # define M_TWOPI (M_PI * 2.0) |
106 | | # define off_t _off_t |
107 | | |
108 | | # define lstat(x, y) php_sys_lstat(x, y) |
109 | | # define chdir(path) _chdir(path) |
110 | | # define mkdir(a, b) _mkdir(a) |
111 | | # define rmdir(a) _rmdir(a) |
112 | | # define getpid _getpid |
113 | | # define php_sleep(t) SleepEx(t*1000, TRUE) |
114 | | |
115 | | # ifndef getcwd |
116 | | # define getcwd(a, b) _getcwd(a, b) |
117 | | # endif |
118 | | #endif |
119 | | |
120 | | #if PHP_DEBUG |
121 | | #undef NDEBUG |
122 | | #else |
123 | | #ifndef NDEBUG |
124 | | #define NDEBUG |
125 | | #endif |
126 | | #endif |
127 | | #include <assert.h> |
128 | | |
129 | | #ifdef HAVE_UNIX_H |
130 | | #include <unix.h> |
131 | | #endif |
132 | | |
133 | | #if HAVE_ALLOCA_H |
134 | | #include <alloca.h> |
135 | | #endif |
136 | | |
137 | | #if HAVE_BUILD_DEFS_H |
138 | | #include <build-defs.h> |
139 | | #endif |
140 | | |
141 | | /* |
142 | | * This is a fast version of strlcpy which should be used, if you |
143 | | * know the size of the destination buffer and if you know |
144 | | * the length of the source string. |
145 | | * |
146 | | * size is the allocated number of bytes of dst |
147 | | * src_size is the number of bytes excluding the NUL of src |
148 | | */ |
149 | | |
150 | | #define PHP_STRLCPY(dst, src, size, src_size) \ |
151 | 0 | { \ |
152 | 0 | size_t php_str_len; \ |
153 | 0 | \ |
154 | 0 | if (src_size >= size) \ |
155 | 0 | php_str_len = size - 1; \ |
156 | 0 | else \ |
157 | 0 | php_str_len = src_size; \ |
158 | 0 | memcpy(dst, src, php_str_len); \ |
159 | 0 | dst[php_str_len] = '\0'; \ |
160 | 0 | } |
161 | | |
162 | | #ifndef HAVE_STRLCPY |
163 | | BEGIN_EXTERN_C() |
164 | | PHPAPI size_t php_strlcpy(char *dst, const char *src, size_t siz); |
165 | | END_EXTERN_C() |
166 | | #undef strlcpy |
167 | 0 | #define strlcpy php_strlcpy |
168 | | #define HAVE_STRLCPY 1 |
169 | | #define USE_STRLCPY_PHP_IMPL 1 |
170 | | #endif |
171 | | |
172 | | #ifndef HAVE_STRLCAT |
173 | | BEGIN_EXTERN_C() |
174 | | PHPAPI size_t php_strlcat(char *dst, const char *src, size_t siz); |
175 | | END_EXTERN_C() |
176 | | #undef strlcat |
177 | 10.9k | #define strlcat php_strlcat |
178 | | #define HAVE_STRLCAT 1 |
179 | | #define USE_STRLCAT_PHP_IMPL 1 |
180 | | #endif |
181 | | |
182 | | #ifndef HAVE_EXPLICIT_BZERO |
183 | | BEGIN_EXTERN_C() |
184 | | PHPAPI void php_explicit_bzero(void *dst, size_t siz); |
185 | | END_EXTERN_C() |
186 | | #undef explicit_bzero |
187 | 0 | #define explicit_bzero php_explicit_bzero |
188 | | #endif |
189 | | |
190 | | #ifndef HAVE_STRTOK_R |
191 | | BEGIN_EXTERN_C() |
192 | | char *strtok_r(char *s, const char *delim, char **last); |
193 | | END_EXTERN_C() |
194 | | #endif |
195 | | |
196 | | #ifndef HAVE_SOCKLEN_T |
197 | | # ifdef PHP_WIN32 |
198 | | typedef int socklen_t; |
199 | | # else |
200 | | typedef unsigned int socklen_t; |
201 | | # endif |
202 | | #endif |
203 | | |
204 | | #define CREATE_MUTEX(a, b) |
205 | | #define SET_MUTEX(a) |
206 | | #define FREE_MUTEX(a) |
207 | | |
208 | | /* |
209 | | * Then the ODBC support can use both iodbc and Solid, |
210 | | * uncomment this. |
211 | | * #define HAVE_ODBC (HAVE_IODBC|HAVE_SOLID) |
212 | | */ |
213 | | |
214 | | #include <stdlib.h> |
215 | | #include <ctype.h> |
216 | | #if HAVE_UNISTD_H |
217 | | #include <unistd.h> |
218 | | #endif |
219 | | |
220 | | #include <stdarg.h> |
221 | | |
222 | | #include "php_stdint.h" |
223 | | |
224 | | #include "zend_hash.h" |
225 | | #include "zend_alloc.h" |
226 | | #include "zend_stack.h" |
227 | | #include <string.h> |
228 | | |
229 | | #if HAVE_PWD_H |
230 | | # ifdef PHP_WIN32 |
231 | | #include "win32/param.h" |
232 | | # else |
233 | | #include <pwd.h> |
234 | | #include <sys/param.h> |
235 | | # endif |
236 | | #endif |
237 | | |
238 | | #include <limits.h> |
239 | | |
240 | | #ifndef LONG_MAX |
241 | | #define LONG_MAX 2147483647L |
242 | | #endif |
243 | | |
244 | | #ifndef LONG_MIN |
245 | | #define LONG_MIN (- LONG_MAX - 1) |
246 | | #endif |
247 | | |
248 | | #ifndef INT_MAX |
249 | | #define INT_MAX 2147483647 |
250 | | #endif |
251 | | |
252 | | #ifndef INT_MIN |
253 | | #define INT_MIN (- INT_MAX - 1) |
254 | | #endif |
255 | | |
256 | | /* double limits */ |
257 | | #include <float.h> |
258 | | #if defined(DBL_MANT_DIG) && defined(DBL_MIN_EXP) |
259 | 303k | #define PHP_DOUBLE_MAX_LENGTH (3 + DBL_MANT_DIG - DBL_MIN_EXP) |
260 | | #else |
261 | | #define PHP_DOUBLE_MAX_LENGTH 1080 |
262 | | #endif |
263 | | |
264 | | #define PHP_GCC_VERSION ZEND_GCC_VERSION |
265 | | #define PHP_ATTRIBUTE_MALLOC ZEND_ATTRIBUTE_MALLOC |
266 | | #define PHP_ATTRIBUTE_FORMAT ZEND_ATTRIBUTE_FORMAT |
267 | | |
268 | | BEGIN_EXTERN_C() |
269 | | #include "snprintf.h" |
270 | | END_EXTERN_C() |
271 | | #include "spprintf.h" |
272 | | |
273 | 0 | #define EXEC_INPUT_BUF 4096 |
274 | | |
275 | | #define PHP_MIME_TYPE "application/x-httpd-php" |
276 | | |
277 | | /* macros */ |
278 | 0 | #define STR_PRINT(str) ((str)?(str):"") |
279 | | |
280 | | #ifndef MAXPATHLEN |
281 | | # ifdef PHP_WIN32 |
282 | | # include "win32/ioutil.h" |
283 | | # define MAXPATHLEN PHP_WIN32_IOUTIL_MAXPATHLEN |
284 | | # elif PATH_MAX |
285 | | # define MAXPATHLEN PATH_MAX |
286 | | # elif defined(MAX_PATH) |
287 | | # define MAXPATHLEN MAX_PATH |
288 | | # else |
289 | | # define MAXPATHLEN 256 /* Should be safe for any weird systems that do not define it */ |
290 | | # endif |
291 | | #endif |
292 | | |
293 | 0 | #define php_ignore_value(x) ZEND_IGNORE_VALUE(x) |
294 | | |
295 | | /* global variables */ |
296 | | #ifndef PHP_WIN32 |
297 | | #define php_sleep sleep |
298 | | extern char **environ; |
299 | | #endif /* ifndef PHP_WIN32 */ |
300 | | |
301 | | #ifdef PHP_PWRITE_64 |
302 | | ssize_t pwrite(int, void *, size_t, off64_t); |
303 | | #endif |
304 | | |
305 | | #ifdef PHP_PREAD_64 |
306 | | ssize_t pread(int, void *, size_t, off64_t); |
307 | | #endif |
308 | | |
309 | | BEGIN_EXTERN_C() |
310 | | void phperror(char *error); |
311 | | PHPAPI size_t php_write(void *buf, size_t size); |
312 | | PHPAPI size_t php_printf(const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1, 2); |
313 | | PHPAPI size_t php_printf_unchecked(const char *format, ...); |
314 | | PHPAPI int php_get_module_initialized(void); |
315 | | #ifdef HAVE_SYSLOG_H |
316 | | #include "php_syslog.h" |
317 | | #define php_log_err(msg) php_log_err_with_severity(msg, LOG_NOTICE) |
318 | | #else |
319 | | #define php_log_err(msg) php_log_err_with_severity(msg, 5) |
320 | | #endif |
321 | | PHPAPI ZEND_COLD void php_log_err_with_severity(const char *log_message, int syslog_type_int); |
322 | | int Debug(char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1, 2); |
323 | | int cfgparse(void); |
324 | | END_EXTERN_C() |
325 | | |
326 | 0 | #define php_error zend_error |
327 | | #define error_handling_t zend_error_handling_t |
328 | | |
329 | | BEGIN_EXTERN_C() |
330 | | static inline ZEND_ATTRIBUTE_DEPRECATED void php_set_error_handling(error_handling_t error_handling, zend_class_entry *exception_class) |
331 | 0 | { |
332 | 0 | zend_replace_error_handling(error_handling, exception_class, NULL); |
333 | 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.c:php_set_error_handling Unexecuted instantiation: hash_md.c:php_set_error_handling Unexecuted instantiation: hash_sha.c:php_set_error_handling Unexecuted instantiation: hash_ripemd.c:php_set_error_handling Unexecuted instantiation: hash_haval.c:php_set_error_handling Unexecuted instantiation: hash_tiger.c:php_set_error_handling Unexecuted instantiation: hash_gost.c:php_set_error_handling Unexecuted instantiation: hash_snefru.c:php_set_error_handling Unexecuted instantiation: hash_whirlpool.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_joaat.c:php_set_error_handling Unexecuted instantiation: hash_sha3.c:php_set_error_handling Unexecuted instantiation: json.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: mbstring.c:php_set_error_handling Unexecuted instantiation: php_unicode.c:php_set_error_handling Unexecuted instantiation: mb_gpc.c:php_set_error_handling Unexecuted instantiation: php_mbregex.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_functions.c:php_set_error_handling Unexecuted instantiation: spl_engine.c:php_set_error_handling Unexecuted instantiation: spl_iterators.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_exceptions.c:php_set_error_handling Unexecuted instantiation: spl_observer.c:php_set_error_handling Unexecuted instantiation: spl_dllist.c:php_set_error_handling Unexecuted instantiation: spl_heap.c:php_set_error_handling Unexecuted instantiation: spl_fixedarray.c:php_set_error_handling Unexecuted instantiation: crypt_sha512.c:php_set_error_handling Unexecuted instantiation: crypt_sha256.c:php_set_error_handling Unexecuted instantiation: php_crypt_r.c:php_set_error_handling Unexecuted instantiation: array.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.c:php_set_error_handling Unexecuted instantiation: crypt.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: 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: head.c:php_set_error_handling Unexecuted instantiation: html.c:php_set_error_handling Unexecuted instantiation: image.c:php_set_error_handling Unexecuted instantiation: info.c:php_set_error_handling Unexecuted instantiation: iptc.c:php_set_error_handling Unexecuted instantiation: lcg.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: pack.c:php_set_error_handling Unexecuted instantiation: pageinfo.c:php_set_error_handling Unexecuted instantiation: quot_print.c:php_set_error_handling Unexecuted instantiation: rand.c:php_set_error_handling Unexecuted instantiation: mt_rand.c:php_set_error_handling Unexecuted instantiation: soundex.c:php_set_error_handling Unexecuted instantiation: string.c:php_set_error_handling Unexecuted instantiation: scanf.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.c:php_set_error_handling Unexecuted instantiation: var.c:php_set_error_handling Unexecuted instantiation: versioning.c:php_set_error_handling Unexecuted instantiation: assert.c:php_set_error_handling Unexecuted instantiation: strnatcmp.c:php_set_error_handling Unexecuted instantiation: levenshtein.c:php_set_error_handling Unexecuted instantiation: incomplete_class.c:php_set_error_handling Unexecuted instantiation: url_scanner_ex.c:php_set_error_handling Unexecuted instantiation: ftp_fopen_wrapper.c:php_set_error_handling Unexecuted instantiation: http_fopen_wrapper.c:php_set_error_handling Unexecuted instantiation: php_fopen_wrapper.c:php_set_error_handling Unexecuted instantiation: credits.c:php_set_error_handling Unexecuted instantiation: css.c:php_set_error_handling Unexecuted instantiation: var_unserializer.c:php_set_error_handling Unexecuted instantiation: ftok.c:php_set_error_handling Unexecuted instantiation: sha1.c:php_set_error_handling Unexecuted instantiation: user_filters.c:php_set_error_handling Unexecuted instantiation: uuencode.c:php_set_error_handling Unexecuted instantiation: filters.c:php_set_error_handling Unexecuted instantiation: proc_open.c:php_set_error_handling Unexecuted instantiation: streamsfuncs.c:php_set_error_handling Unexecuted instantiation: http.c:php_set_error_handling Unexecuted instantiation: password.c:php_set_error_handling Unexecuted instantiation: random.c:php_set_error_handling Unexecuted instantiation: net.c:php_set_error_handling Unexecuted instantiation: hrtime.c:php_set_error_handling Unexecuted instantiation: main.c:php_set_error_handling Unexecuted instantiation: snprintf.c:php_set_error_handling Unexecuted instantiation: spprintf.c:php_set_error_handling Unexecuted instantiation: fopen_wrappers.c:php_set_error_handling Unexecuted instantiation: php_scandir.c:php_set_error_handling Unexecuted instantiation: php_ini.c:php_set_error_handling Unexecuted instantiation: SAPI.c:php_set_error_handling Unexecuted instantiation: rfc1867.c:php_set_error_handling Unexecuted instantiation: php_content_types.c:php_set_error_handling Unexecuted instantiation: strlcpy.c:php_set_error_handling Unexecuted instantiation: strlcat.c:php_set_error_handling Unexecuted instantiation: explicit_bzero.c:php_set_error_handling Unexecuted instantiation: reentrancy.c:php_set_error_handling Unexecuted instantiation: php_variables.c:php_set_error_handling Unexecuted instantiation: php_ticks.c:php_set_error_handling Unexecuted instantiation: network.c:php_set_error_handling Unexecuted instantiation: php_open_temporary_file.c:php_set_error_handling Unexecuted instantiation: output.c:php_set_error_handling Unexecuted instantiation: getopt.c:php_set_error_handling Unexecuted instantiation: php_syslog.c:php_set_error_handling Unexecuted instantiation: streams.c:php_set_error_handling Unexecuted instantiation: cast.c:php_set_error_handling Unexecuted instantiation: memory.c:php_set_error_handling Unexecuted instantiation: filter.c:php_set_error_handling Unexecuted instantiation: plain_wrapper.c:php_set_error_handling Unexecuted instantiation: userspace.c:php_set_error_handling Unexecuted instantiation: transports.c:php_set_error_handling Unexecuted instantiation: xp_socket.c:php_set_error_handling Unexecuted instantiation: mmap.c:php_set_error_handling Unexecuted instantiation: glob_wrapper.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 |
334 | 0 | static inline ZEND_ATTRIBUTE_DEPRECATED void php_std_error_handling() {} 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.c:php_std_error_handling Unexecuted instantiation: hash_md.c:php_std_error_handling Unexecuted instantiation: hash_sha.c:php_std_error_handling Unexecuted instantiation: hash_ripemd.c:php_std_error_handling Unexecuted instantiation: hash_haval.c:php_std_error_handling Unexecuted instantiation: hash_tiger.c:php_std_error_handling Unexecuted instantiation: hash_gost.c:php_std_error_handling Unexecuted instantiation: hash_snefru.c:php_std_error_handling Unexecuted instantiation: hash_whirlpool.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_joaat.c:php_std_error_handling Unexecuted instantiation: hash_sha3.c:php_std_error_handling Unexecuted instantiation: json.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: mbstring.c:php_std_error_handling Unexecuted instantiation: php_unicode.c:php_std_error_handling Unexecuted instantiation: mb_gpc.c:php_std_error_handling Unexecuted instantiation: php_mbregex.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_functions.c:php_std_error_handling Unexecuted instantiation: spl_engine.c:php_std_error_handling Unexecuted instantiation: spl_iterators.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_exceptions.c:php_std_error_handling Unexecuted instantiation: spl_observer.c:php_std_error_handling Unexecuted instantiation: spl_dllist.c:php_std_error_handling Unexecuted instantiation: spl_heap.c:php_std_error_handling Unexecuted instantiation: spl_fixedarray.c:php_std_error_handling Unexecuted instantiation: crypt_sha512.c:php_std_error_handling Unexecuted instantiation: crypt_sha256.c:php_std_error_handling Unexecuted instantiation: php_crypt_r.c:php_std_error_handling Unexecuted instantiation: array.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.c:php_std_error_handling Unexecuted instantiation: crypt.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: 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: head.c:php_std_error_handling Unexecuted instantiation: html.c:php_std_error_handling Unexecuted instantiation: image.c:php_std_error_handling Unexecuted instantiation: info.c:php_std_error_handling Unexecuted instantiation: iptc.c:php_std_error_handling Unexecuted instantiation: lcg.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: pack.c:php_std_error_handling Unexecuted instantiation: pageinfo.c:php_std_error_handling Unexecuted instantiation: quot_print.c:php_std_error_handling Unexecuted instantiation: rand.c:php_std_error_handling Unexecuted instantiation: mt_rand.c:php_std_error_handling Unexecuted instantiation: soundex.c:php_std_error_handling Unexecuted instantiation: string.c:php_std_error_handling Unexecuted instantiation: scanf.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.c:php_std_error_handling Unexecuted instantiation: var.c:php_std_error_handling Unexecuted instantiation: versioning.c:php_std_error_handling Unexecuted instantiation: assert.c:php_std_error_handling Unexecuted instantiation: strnatcmp.c:php_std_error_handling Unexecuted instantiation: levenshtein.c:php_std_error_handling Unexecuted instantiation: incomplete_class.c:php_std_error_handling Unexecuted instantiation: url_scanner_ex.c:php_std_error_handling Unexecuted instantiation: ftp_fopen_wrapper.c:php_std_error_handling Unexecuted instantiation: http_fopen_wrapper.c:php_std_error_handling Unexecuted instantiation: php_fopen_wrapper.c:php_std_error_handling Unexecuted instantiation: credits.c:php_std_error_handling Unexecuted instantiation: css.c:php_std_error_handling Unexecuted instantiation: var_unserializer.c:php_std_error_handling Unexecuted instantiation: ftok.c:php_std_error_handling Unexecuted instantiation: sha1.c:php_std_error_handling Unexecuted instantiation: user_filters.c:php_std_error_handling Unexecuted instantiation: uuencode.c:php_std_error_handling Unexecuted instantiation: filters.c:php_std_error_handling Unexecuted instantiation: proc_open.c:php_std_error_handling Unexecuted instantiation: streamsfuncs.c:php_std_error_handling Unexecuted instantiation: http.c:php_std_error_handling Unexecuted instantiation: password.c:php_std_error_handling Unexecuted instantiation: random.c:php_std_error_handling Unexecuted instantiation: net.c:php_std_error_handling Unexecuted instantiation: hrtime.c:php_std_error_handling Unexecuted instantiation: main.c:php_std_error_handling Unexecuted instantiation: snprintf.c:php_std_error_handling Unexecuted instantiation: spprintf.c:php_std_error_handling Unexecuted instantiation: fopen_wrappers.c:php_std_error_handling Unexecuted instantiation: php_scandir.c:php_std_error_handling Unexecuted instantiation: php_ini.c:php_std_error_handling Unexecuted instantiation: SAPI.c:php_std_error_handling Unexecuted instantiation: rfc1867.c:php_std_error_handling Unexecuted instantiation: php_content_types.c:php_std_error_handling Unexecuted instantiation: strlcpy.c:php_std_error_handling Unexecuted instantiation: strlcat.c:php_std_error_handling Unexecuted instantiation: explicit_bzero.c:php_std_error_handling Unexecuted instantiation: reentrancy.c:php_std_error_handling Unexecuted instantiation: php_variables.c:php_std_error_handling Unexecuted instantiation: php_ticks.c:php_std_error_handling Unexecuted instantiation: network.c:php_std_error_handling Unexecuted instantiation: php_open_temporary_file.c:php_std_error_handling Unexecuted instantiation: output.c:php_std_error_handling Unexecuted instantiation: getopt.c:php_std_error_handling Unexecuted instantiation: php_syslog.c:php_std_error_handling Unexecuted instantiation: streams.c:php_std_error_handling Unexecuted instantiation: cast.c:php_std_error_handling Unexecuted instantiation: memory.c:php_std_error_handling Unexecuted instantiation: filter.c:php_std_error_handling Unexecuted instantiation: plain_wrapper.c:php_std_error_handling Unexecuted instantiation: userspace.c:php_std_error_handling Unexecuted instantiation: transports.c:php_std_error_handling Unexecuted instantiation: xp_socket.c:php_std_error_handling Unexecuted instantiation: mmap.c:php_std_error_handling Unexecuted instantiation: glob_wrapper.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 |
335 | | |
336 | | 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); |
337 | | |
338 | | /* PHPAPI void php_error(int type, const char *format, ...); */ |
339 | | PHPAPI ZEND_COLD void php_error_docref(const char *docref, int type, const char *format, ...) |
340 | | PHP_ATTRIBUTE_FORMAT(printf, 3, 4); |
341 | | PHPAPI ZEND_COLD void php_error_docref1(const char *docref, const char *param1, int type, const char *format, ...) |
342 | | PHP_ATTRIBUTE_FORMAT(printf, 4, 5); |
343 | | PHPAPI ZEND_COLD void php_error_docref2(const char *docref, const char *param1, const char *param2, int type, const char *format, ...) |
344 | | PHP_ATTRIBUTE_FORMAT(printf, 5, 6); |
345 | | #ifdef PHP_WIN32 |
346 | | PHPAPI ZEND_COLD void php_win32_docref2_from_error(DWORD error, const char *param1, const char *param2); |
347 | | #endif |
348 | | END_EXTERN_C() |
349 | | |
350 | | #define zenderror phperror |
351 | | #define zendlex phplex |
352 | | |
353 | | #define phpparse zendparse |
354 | | #define phprestart zendrestart |
355 | | #define phpin zendin |
356 | | |
357 | 25.5k | #define php_memnstr zend_memnstr |
358 | | |
359 | | /* functions */ |
360 | | BEGIN_EXTERN_C() |
361 | | PHPAPI extern int (*php_register_internal_extensions_func)(void); |
362 | | PHPAPI int php_register_internal_extensions(void); |
363 | | PHPAPI void php_register_pre_request_shutdown(void (*func)(void *), void *userdata); |
364 | | PHPAPI void php_com_initialize(void); |
365 | | PHPAPI char *php_get_current_user(void); |
366 | | |
367 | | PHPAPI const char *php_get_internal_encoding(void); |
368 | | PHPAPI const char *php_get_input_encoding(void); |
369 | | PHPAPI const char *php_get_output_encoding(void); |
370 | | PHPAPI extern void (*php_internal_encoding_changed)(void); |
371 | | END_EXTERN_C() |
372 | | |
373 | | /* PHP-named Zend macro wrappers */ |
374 | | #define PHP_FN ZEND_FN |
375 | | #define PHP_MN ZEND_MN |
376 | | #define PHP_NAMED_FUNCTION ZEND_NAMED_FUNCTION |
377 | | #define PHP_FUNCTION ZEND_FUNCTION |
378 | | #define PHP_METHOD ZEND_METHOD |
379 | | |
380 | | #define PHP_RAW_NAMED_FE ZEND_RAW_NAMED_FE |
381 | | #define PHP_NAMED_FE ZEND_NAMED_FE |
382 | | #define PHP_FE ZEND_FE |
383 | | #define PHP_DEP_FE ZEND_DEP_FE |
384 | | #define PHP_FALIAS ZEND_FALIAS |
385 | | #define PHP_DEP_FALIAS ZEND_DEP_FALIAS |
386 | | #define PHP_ME ZEND_ME |
387 | | #define PHP_MALIAS ZEND_MALIAS |
388 | | #define PHP_ABSTRACT_ME ZEND_ABSTRACT_ME |
389 | | #define PHP_ME_MAPPING ZEND_ME_MAPPING |
390 | | #define PHP_FE_END ZEND_FE_END |
391 | | |
392 | | #define PHP_MODULE_STARTUP_N ZEND_MODULE_STARTUP_N |
393 | | #define PHP_MODULE_SHUTDOWN_N ZEND_MODULE_SHUTDOWN_N |
394 | | #define PHP_MODULE_ACTIVATE_N ZEND_MODULE_ACTIVATE_N |
395 | | #define PHP_MODULE_DEACTIVATE_N ZEND_MODULE_DEACTIVATE_N |
396 | | #define PHP_MODULE_INFO_N ZEND_MODULE_INFO_N |
397 | | |
398 | | #define PHP_MODULE_STARTUP_D ZEND_MODULE_STARTUP_D |
399 | | #define PHP_MODULE_SHUTDOWN_D ZEND_MODULE_SHUTDOWN_D |
400 | | #define PHP_MODULE_ACTIVATE_D ZEND_MODULE_ACTIVATE_D |
401 | | #define PHP_MODULE_DEACTIVATE_D ZEND_MODULE_DEACTIVATE_D |
402 | | #define PHP_MODULE_INFO_D ZEND_MODULE_INFO_D |
403 | | |
404 | | /* Compatibility macros */ |
405 | 116k | #define PHP_MINIT ZEND_MODULE_STARTUP_N |
406 | 0 | #define PHP_MSHUTDOWN ZEND_MODULE_SHUTDOWN_N |
407 | 1.97M | #define PHP_RINIT ZEND_MODULE_ACTIVATE_N |
408 | 2.77M | #define PHP_RSHUTDOWN ZEND_MODULE_DEACTIVATE_N |
409 | 3.64k | #define PHP_MINFO ZEND_MODULE_INFO_N |
410 | | #define PHP_GINIT ZEND_GINIT |
411 | | #define PHP_GSHUTDOWN ZEND_GSHUTDOWN |
412 | | |
413 | | #define PHP_MINIT_FUNCTION ZEND_MODULE_STARTUP_D |
414 | | #define PHP_MSHUTDOWN_FUNCTION ZEND_MODULE_SHUTDOWN_D |
415 | | #define PHP_RINIT_FUNCTION ZEND_MODULE_ACTIVATE_D |
416 | | #define PHP_RSHUTDOWN_FUNCTION ZEND_MODULE_DEACTIVATE_D |
417 | | #define PHP_MINFO_FUNCTION ZEND_MODULE_INFO_D |
418 | | #define PHP_GINIT_FUNCTION ZEND_GINIT_FUNCTION |
419 | | #define PHP_GSHUTDOWN_FUNCTION ZEND_GSHUTDOWN_FUNCTION |
420 | | |
421 | | #define PHP_MODULE_GLOBALS ZEND_MODULE_GLOBALS |
422 | | |
423 | | |
424 | | /* Output support */ |
425 | | #include "main/php_output.h" |
426 | | |
427 | | |
428 | | #include "php_streams.h" |
429 | | #include "php_memory_streams.h" |
430 | | #include "fopen_wrappers.h" |
431 | | |
432 | | |
433 | | /* Virtual current working directory support */ |
434 | | #include "zend_virtual_cwd.h" |
435 | | |
436 | | #include "zend_constants.h" |
437 | | |
438 | | /* connection status states */ |
439 | 395k | #define PHP_CONNECTION_NORMAL 0 |
440 | 0 | #define PHP_CONNECTION_ABORTED 1 |
441 | 0 | #define PHP_CONNECTION_TIMEOUT 2 |
442 | | |
443 | | #include "php_reentrancy.h" |
444 | | |
445 | | #endif |