php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
info.c
Go to the documentation of this file.
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: Rasmus Lerdorf <rasmus@php.net> |
14 | Zeev Suraski <zeev@php.net> |
15 | Colin Viebrock <colin@viebrock.ca> |
16 +----------------------------------------------------------------------+
17*/
18
19#include "php.h"
20#include "php_ini.h"
21#include "php_globals.h"
22#include "ext/standard/head.h"
23#include "ext/standard/html.h"
24#include "info.h"
25#include "credits.h"
26#include "css.h"
27#include "SAPI.h"
28#include <time.h>
29#include "php_main.h"
30#include "zend_globals.h" /* needs ELS */
31#include "zend_extensions.h"
32#include "zend_highlight.h"
33#ifdef HAVE_SYS_UTSNAME_H
34#include <sys/utsname.h>
35#endif
36#include "url.h"
37
38#ifdef PHP_WIN32
39# include "winver.h"
40#endif
41
42#define SECTION(name) if (!sapi_module.phpinfo_as_text) { \
43 php_info_print("<h2>" name "</h2>\n"); \
44 } else { \
45 php_info_print_table_start(); \
46 php_info_print_table_header(1, name); \
47 php_info_print_table_end(); \
48 } \
49
50PHPAPI extern char *php_ini_opened_path;
51PHPAPI extern char *php_ini_scanned_path;
52PHPAPI extern char *php_ini_scanned_files;
53
54static ZEND_COLD size_t php_info_print_html_esc(const char *str, size_t len) /* {{{ */
55{
56 size_t written;
57 zend_string *new_str;
58
59 new_str = php_escape_html_entities((const unsigned char *) str, len, 0, ENT_QUOTES, "utf-8");
60 written = php_output_write(ZSTR_VAL(new_str), ZSTR_LEN(new_str));
61 zend_string_free(new_str);
62 return written;
63}
64/* }}} */
65
66static ZEND_COLD size_t php_info_printf(const char *fmt, ...) /* {{{ */
67{
68 char *buf;
69 size_t len, written;
70 va_list argv;
71
72 va_start(argv, fmt);
73 len = vspprintf(&buf, 0, fmt, argv);
74 va_end(argv);
75
76 written = php_output_write(buf, len);
77 efree(buf);
78 return written;
79}
80/* }}} */
81
82static zend_always_inline size_t php_info_print(const char *str) /* {{{ */
83{
84 return php_output_write(str, strlen(str));
85}
86/* }}} */
87
88static ZEND_COLD void php_info_print_stream_hash(const char *name, HashTable *ht) /* {{{ */
89{
91
92 if (ht) {
93 if (zend_hash_num_elements(ht)) {
94 int first = 1;
95
96 if (!sapi_module.phpinfo_as_text) {
97 php_info_printf("<tr><td class=\"e\">Registered %s</td><td class=\"v\">", name);
98 } else {
99 php_info_printf("\nRegistered %s => ", name);
100 }
101
102 if (!HT_IS_PACKED(ht)) {
104 if (key) {
105 if (first) {
106 first = 0;
107 } else {
108 php_info_print(", ");
109 }
110 if (!sapi_module.phpinfo_as_text) {
111 php_info_print_html_esc(ZSTR_VAL(key), ZSTR_LEN(key));
112 } else {
113 php_info_print(ZSTR_VAL(key));
114 }
115 }
117 }
118
119 if (!sapi_module.phpinfo_as_text) {
120 php_info_print("</td></tr>\n");
121 }
122 } else {
123 char reg_name[128];
124 snprintf(reg_name, sizeof(reg_name), "Registered %s", name);
125 php_info_print_table_row(2, reg_name, "none registered");
126 }
127 } else {
128 php_info_print_table_row(2, name, "disabled");
129 }
130}
131/* }}} */
132
134{
135 if (zend_module->info_func || zend_module->version) {
136 if (!sapi_module.phpinfo_as_text) {
137 zend_string *url_name = php_url_encode(zend_module->name, strlen(zend_module->name));
138
139 zend_str_tolower(ZSTR_VAL(url_name), ZSTR_LEN(url_name));
140 php_info_printf("<h2><a name=\"module_%s\" href=\"#module_%s\">%s</a></h2>\n", ZSTR_VAL(url_name), ZSTR_VAL(url_name), zend_module->name);
141
142 efree(url_name);
143 } else {
145 php_info_print_table_header(1, zend_module->name);
147 }
148 if (zend_module->info_func) {
149 zend_module->info_func(zend_module);
150 } else {
152 php_info_print_table_row(2, "Version", zend_module->version);
155 }
156 } else {
157 if (!sapi_module.phpinfo_as_text) {
158 php_info_printf("<tr><td class=\"v\">%s</td></tr>\n", zend_module->name);
159 } else {
160 php_info_printf("%s\n", zend_module->name);
161 }
162 }
163}
164/* }}} */
165
166/* {{{ php_print_gpcse_array */
167static ZEND_COLD void php_print_gpcse_array(char *name, size_t name_length)
168{
169 zval *data, *tmp;
170 zend_string *string_key;
171 zend_ulong num_key;
173
174 key = zend_string_init(name, name_length, 0);
176
177 if ((data = zend_hash_find_deref(&EG(symbol_table), key)) != NULL && (Z_TYPE_P(data) == IS_ARRAY)) {
178 ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(data), num_key, string_key, tmp) {
179 if (!sapi_module.phpinfo_as_text) {
180 php_info_print("<tr>");
181 php_info_print("<td class=\"e\">");
182 }
183
184 php_info_print("$");
185 php_info_print(name);
186 php_info_print("['");
187
188 if (string_key != NULL) {
189 if (!sapi_module.phpinfo_as_text) {
190 php_info_print_html_esc(ZSTR_VAL(string_key), ZSTR_LEN(string_key));
191 } else {
192 php_info_print(ZSTR_VAL(string_key));
193 }
194 } else {
195 php_info_printf(ZEND_ULONG_FMT, num_key);
196 }
197 php_info_print("']");
198 if (!sapi_module.phpinfo_as_text) {
199 php_info_print("</td><td class=\"v\">");
200 } else {
201 php_info_print(" => ");
202 }
203 ZVAL_DEREF(tmp);
204 if (Z_TYPE_P(tmp) == IS_ARRAY) {
205 if (!sapi_module.phpinfo_as_text) {
207 php_info_print("<pre>");
208 php_info_print_html_esc(ZSTR_VAL(str), ZSTR_LEN(str));
209 php_info_print("</pre>");
211 } else {
212 zend_print_zval_r(tmp, 0);
213 }
214 } else {
215 zend_string *tmp2;
216 zend_string *str = zval_get_tmp_string(tmp, &tmp2);
217
218 if (!sapi_module.phpinfo_as_text) {
219 if (ZSTR_LEN(str) == 0) {
220 php_info_print("<i>no value</i>");
221 } else {
222 php_info_print_html_esc(ZSTR_VAL(str), ZSTR_LEN(str));
223 }
224 } else {
225 php_info_print(ZSTR_VAL(str));
226 }
227
228 zend_tmp_string_release(tmp2);
229 }
230 if (!sapi_module.phpinfo_as_text) {
231 php_info_print("</td></tr>\n");
232 } else {
233 php_info_print("\n");
234 }
236 }
237 zend_string_efree(key);
238}
239/* }}} */
240
241/* {{{ php_info_print_style */
243{
244 php_info_printf("<style type=\"text/css\">\n");
246 php_info_printf("</style>\n");
247}
248/* }}} */
249
250#ifdef PHP_WIN32
251/* {{{ */
252
253static char* php_get_windows_name()
254{
255 OSVERSIONINFOEX osvi = EG(windows_version_info);
256 SYSTEM_INFO si;
257 DWORD dwType;
258 const char *major = NULL, *sub = NULL;
259
260 ZeroMemory(&si, sizeof(SYSTEM_INFO));
261
262 GetNativeSystemInfo(&si);
263
264 if (VER_PLATFORM_WIN32_NT==osvi.dwPlatformId && osvi.dwMajorVersion >= 10) {
265 if (osvi.dwMajorVersion == 10) {
266 if (osvi.dwMinorVersion == 0) {
267 if (osvi.wProductType == VER_NT_WORKSTATION) {
268 if (osvi.dwBuildNumber >= 22000) {
269 major = "Windows 11";
270 } else {
271 major = "Windows 10";
272 }
273 } else {
274 if (osvi.dwBuildNumber >= 26100) {
275 major = "Windows Server 2025";
276 } else if (osvi.dwBuildNumber >= 20348) {
277 major = "Windows Server 2022";
278 } else if (osvi.dwBuildNumber >= 19042) {
279 major = "Windows Server, version 20H2";
280 } else if (osvi.dwBuildNumber >= 19041) {
281 major = "Windows Server, version 2004";
282 } else if (osvi.dwBuildNumber >= 18363) {
283 major = "Windows Server, version 1909";
284 } else if (osvi.dwBuildNumber >= 18362) {
285 major = "Windows Server, version 1903";
286 } else if (osvi.dwBuildNumber >= 17763) {
287 // could also be Windows Server, version 1809, but there's no easy way to tell
288 major = "Windows Server 2019";
289 } else if (osvi.dwBuildNumber >= 17134) {
290 major = "Windows Server, version 1803";
291 } else if (osvi.dwBuildNumber >= 16299) {
292 major = "Windows Server, version 1709";
293 } else {
294 major = "Windows Server 2016";
295 }
296 }
297 }
298 }
299 } else if (VER_PLATFORM_WIN32_NT==osvi.dwPlatformId && osvi.dwMajorVersion >= 6) {
300 if (osvi.dwMajorVersion == 6) {
301 ZEND_ASSERT(osvi.dwMinorVersion >= 2);
302 if (osvi.dwMinorVersion == 2) {
303 /* could be Windows 8/Windows Server 2012, could be Windows 8.1/Windows Server 2012 R2 */
304 /* XXX and one more X - the above comment is true if no manifest is used for two cases:
305 - if the PHP build doesn't use the correct manifest
306 - if PHP DLL loaded under some binary that doesn't use the correct manifest
307
308 So keep the handling here as is for now, even if we know 6.2 is win8 and nothing else, and think about an improvement. */
309 OSVERSIONINFOEX osvi81;
310 DWORDLONG dwlConditionMask = 0;
311 int op = VER_GREATER_EQUAL;
312
313 ZeroMemory(&osvi81, sizeof(OSVERSIONINFOEX));
314 osvi81.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
315 osvi81.dwMajorVersion = 6;
316 osvi81.dwMinorVersion = 3;
317 osvi81.wServicePackMajor = 0;
318
319 VER_SET_CONDITION(dwlConditionMask, VER_MAJORVERSION, op);
320 VER_SET_CONDITION(dwlConditionMask, VER_MINORVERSION, op);
321 VER_SET_CONDITION(dwlConditionMask, VER_SERVICEPACKMAJOR, op);
322
323 if (VerifyVersionInfo(&osvi81,
324 VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR,
325 dwlConditionMask)) {
326 osvi.dwMinorVersion = 3; /* Windows 8.1/Windows Server 2012 R2 */
327 if (osvi.wProductType == VER_NT_WORKSTATION) {
328 major = "Windows 8.1";
329 } else {
330 major = "Windows Server 2012 R2";
331 }
332 } else {
333 if (osvi.wProductType == VER_NT_WORKSTATION) {
334 major = "Windows 8";
335 } else {
336 major = "Windows Server 2012";
337 }
338 }
339 } else if (osvi.dwMinorVersion == 3) {
340 if (osvi.wProductType == VER_NT_WORKSTATION) {
341 major = "Windows 8.1";
342 } else {
343 major = "Windows Server 2012 R2";
344 }
345 } else {
346 major = "Unknown Windows version";
347 }
348
349 /* No return value check, as it can only fail if the input parameters are broken (which we manually supply) */
350 GetProductInfo(6, 0, 0, 0, &dwType);
351
352 switch (dwType) {
353 case PRODUCT_ULTIMATE:
354 sub = "Ultimate Edition";
355 break;
357 sub = "Home Basic Edition";
358 break;
360 sub = "Home Premium Edition";
361 break;
363 sub = "Enterprise Edition";
364 break;
366 sub = "Home Basic N Edition";
367 break;
368 case PRODUCT_BUSINESS:
369 if ((osvi.dwMajorVersion > 6) || (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion > 0)) {
370 sub = "Professional Edition";
371 } else {
372 sub = "Business Edition";
373 }
374 break;
376 sub = "Standard Edition";
377 break;
379 sub = "Datacenter Edition";
380 break;
382 sub = "Small Business Server";
383 break;
385 sub = "Enterprise Edition";
386 break;
387 case PRODUCT_STARTER:
388 if ((osvi.dwMajorVersion > 6) || (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion > 0)) {
389 sub = "Starter N Edition";
390 } else {
391 sub = "Starter Edition";
392 }
393 break;
395 sub = "Datacenter Edition (core installation)";
396 break;
398 sub = "Standard Edition (core installation)";
399 break;
401 sub = "Enterprise Edition (core installation)";
402 break;
404 sub = "Enterprise Edition for Itanium-based Systems";
405 break;
407 if ((osvi.dwMajorVersion > 6) || (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion > 0)) {
408 sub = "Professional N Edition";
409 } else {
410 sub = "Business N Edition";
411 }
412 break;
414 sub = "Web Server Edition";
415 break;
417 sub = "HPC Edition";
418 break;
420 sub = "Storage Server Essentials Edition";
421 break;
423 sub = "Storage Server Express Edition";
424 break;
426 sub = "Storage Server Standard Edition";
427 break;
429 sub = "Storage Server Workgroup Edition";
430 break;
432 sub = "Storage Server Enterprise Edition";
433 break;
435 sub = "Essential Server Solutions Edition";
436 break;
438 sub = "Small Business Server Premium Edition";
439 break;
441 sub = "Home Premium N Edition";
442 break;
444 sub = "Enterprise N Edition";
445 break;
447 sub = "Ultimate N Edition";
448 break;
450 sub = "Web Server Edition (core installation)";
451 break;
453 sub = "Essential Business Server Management Server Edition";
454 break;
456 sub = "Essential Business Server Management Security Edition";
457 break;
459 sub = "Essential Business Server Management Messaging Edition";
460 break;
462 sub = "Foundation Edition";
463 break;
465 sub = "Home Server 2011 Edition";
466 break;
468 sub = "Essential Server Solutions Edition (without Hyper-V)";
469 break;
471 sub = "Standard Edition (without Hyper-V)";
472 break;
474 sub = "Datacenter Edition (without Hyper-V)";
475 break;
477 sub = "Enterprise Edition (without Hyper-V)";
478 break;
480 sub = "Datacenter Edition (core installation, without Hyper-V)";
481 break;
483 sub = "Standard Edition (core installation, without Hyper-V)";
484 break;
486 sub = "Enterprise Edition (core installation, without Hyper-V)";
487 break;
488 case PRODUCT_HYPERV:
489 sub = "Hyper-V Server";
490 break;
492 sub = "Storage Server Express Edition (core installation)";
493 break;
495 sub = "Storage Server Standard Edition (core installation)";
496 break;
498 sub = "Storage Server Workgroup Edition (core installation)";
499 break;
501 sub = "Storage Server Enterprise Edition (core installation)";
502 break;
504 sub = "Starter N Edition";
505 break;
507 sub = "Professional Edition";
508 break;
510 sub = "Professional N Edition";
511 break;
513 sub = "Small Business Server 2011 Essentials Edition";
514 break;
516 sub = "Server For SB Solutions Edition";
517 break;
519 sub = "Solutions Premium Edition";
520 break;
522 sub = "Solutions Premium Edition (core installation)";
523 break;
525 sub = "Server For SB Solutions EM Edition";
526 break;
528 sub = "Server For SB Solutions EM Edition";
529 break;
531 sub = "MultiPoint Server Edition";
532 break;
534 sub = "Essential Server Solution Management Edition";
535 break;
537 sub = "Essential Server Solution Additional Edition";
538 break;
540 sub = "Essential Server Solution Management SVC Edition";
541 break;
543 sub = "Essential Server Solution Additional SVC Edition";
544 break;
546 sub = "Small Business Server Premium Edition (core installation)";
547 break;
549 sub = "Hyper Core V Edition";
550 break;
551 case PRODUCT_STARTER_E:
552 sub = "Hyper Core V Edition";
553 break;
555 sub = "Enterprise Edition (evaluation installation)";
556 break;
558 sub = "MultiPoint Server Standard Edition (full installation)";
559 break;
561 sub = "MultiPoint Server Premium Edition (full installation)";
562 break;
564 sub = "Standard Edition (evaluation installation)";
565 break;
567 sub = "Datacenter Edition (evaluation installation)";
568 break;
570 sub = "Enterprise N Edition (evaluation installation)";
571 break;
573 sub = "Storage Server Workgroup Edition (evaluation installation)";
574 break;
576 sub = "Storage Server Standard Edition (evaluation installation)";
577 break;
578 case PRODUCT_CORE_N:
579 sub = "Windows 8 N Edition";
580 break;
582 sub = "Windows 8 China Edition";
583 break;
585 sub = "Windows 8 Single Language Edition";
586 break;
587 case PRODUCT_CORE:
588 sub = "Windows 8 Edition";
589 break;
591 sub = "Professional with Media Center Edition";
592 break;
593 }
594 }
595 } else {
597 }
598
599 char *retval;
600 spprintf(&retval, 0, "%s%s%s%s%s", major, sub?" ":"", sub?sub:"", osvi.szCSDVersion[0] != '\0'?" ":"", osvi.szCSDVersion);
601 return retval;
602}
603/* }}} */
604
605/* {{{ */
606static void php_get_windows_cpu(char *buf, size_t bufsize)
607{
608 SYSTEM_INFO SysInfo;
609 GetSystemInfo(&SysInfo);
610 switch (SysInfo.wProcessorArchitecture) {
611 case PROCESSOR_ARCHITECTURE_INTEL :
612 snprintf(buf, bufsize, "i%d", SysInfo.dwProcessorType);
613 break;
614 case PROCESSOR_ARCHITECTURE_MIPS :
615 snprintf(buf, bufsize, "MIPS R%d000", SysInfo.wProcessorLevel);
616 break;
617 case PROCESSOR_ARCHITECTURE_ALPHA :
618 snprintf(buf, bufsize, "Alpha %d", SysInfo.wProcessorLevel);
619 break;
620 case PROCESSOR_ARCHITECTURE_PPC :
621 snprintf(buf, bufsize, "PPC 6%02d", SysInfo.wProcessorLevel);
622 break;
623 case PROCESSOR_ARCHITECTURE_IA64 :
624 snprintf(buf, bufsize, "IA64");
625 break;
626#if defined(PROCESSOR_ARCHITECTURE_IA32_ON_WIN64)
627 case PROCESSOR_ARCHITECTURE_IA32_ON_WIN64 :
628 snprintf(buf, bufsize, "IA32");
629 break;
630#endif
631#if defined(PROCESSOR_ARCHITECTURE_AMD64)
633 snprintf(buf, bufsize, "AMD64");
634 break;
635#endif
636#if defined(PROCESSOR_ARCHITECTURE_ARM64)
637 case PROCESSOR_ARCHITECTURE_ARM64 :
638 snprintf(buf, bufsize, "ARM64");
639 break;
640#endif
641 case PROCESSOR_ARCHITECTURE_UNKNOWN :
642 default:
643 snprintf(buf, bufsize, "Unknown");
644 break;
645 }
646}
647/* }}} */
648#endif
649
650static inline bool php_is_valid_uname_mode(char mode) {
651 return mode == 'a' || mode == 'm' || mode == 'n' || mode == 'r' || mode == 's' || mode == 'v';
652}
653
654/* {{{ php_get_uname */
656{
657 char *php_uname;
658
659 ZEND_ASSERT(php_is_valid_uname_mode(mode));
660#ifdef PHP_WIN32
661 char tmp_uname[256];
662 DWORD dwBuild=0;
663 DWORD dwVersion = GetVersion();
664 DWORD dwWindowsMajorVersion = (DWORD)(LOBYTE(LOWORD(dwVersion)));
665 DWORD dwWindowsMinorVersion = (DWORD)(HIBYTE(LOWORD(dwVersion)));
666 DWORD dwSize = MAX_COMPUTERNAME_LENGTH + 1;
667 char ComputerName[MAX_COMPUTERNAME_LENGTH + 1];
668
669 GetComputerName(ComputerName, &dwSize);
670
671 if (mode == 's') {
672 php_uname = "Windows NT";
673 } else if (mode == 'r') {
674 return strpprintf(0, "%d.%d", dwWindowsMajorVersion, dwWindowsMinorVersion);
675 } else if (mode == 'n') {
676 php_uname = ComputerName;
677 } else if (mode == 'v') {
678 char *winver = php_get_windows_name();
679 dwBuild = (DWORD)(HIWORD(dwVersion));
680
681 ZEND_ASSERT(winver != NULL);
682
683 zend_string *build_with_version = strpprintf(0, "build %d (%s)", dwBuild, winver);
684 efree(winver);
685 return build_with_version;
686 } else if (mode == 'm') {
687 php_get_windows_cpu(tmp_uname, sizeof(tmp_uname));
688 php_uname = tmp_uname;
689 } else { /* assume mode == 'a' */
690 char *winver = php_get_windows_name();
691 char wincpu[20];
692
693 ZEND_ASSERT(winver != NULL);
694
695 php_get_windows_cpu(wincpu, sizeof(wincpu));
696 dwBuild = (DWORD)(HIWORD(dwVersion));
697
698 /* Windows "version" 6.2 could be Windows 8/Windows Server 2012, but also Windows 8.1/Windows Server 2012 R2 */
699 if (dwWindowsMajorVersion == 6 && dwWindowsMinorVersion == 2) {
700 if (strncmp(winver, "Windows 8.1", strlen("Windows 8.1")) == 0 || strncmp(winver, "Windows Server 2012 R2", strlen("Windows Server 2012 R2")) == 0) {
701 dwWindowsMinorVersion = 3;
702 }
703 }
704
705 zend_string *build_with_all_info = strpprintf(0, "%s %s %d.%d build %d (%s) %s",
706 "Windows NT", ComputerName, dwWindowsMajorVersion, dwWindowsMinorVersion, dwBuild,
707 winver ? winver: "unknown", wincpu);
708 efree(winver);
709 return build_with_all_info;
710 }
711#else
712#ifdef HAVE_SYS_UTSNAME_H
713 struct utsname buf;
714 if (uname((struct utsname *)&buf) == -1) {
715 php_uname = PHP_UNAME;
716 } else {
717 if (mode == 's') {
718 php_uname = buf.sysname;
719 } else if (mode == 'r') {
720 php_uname = buf.release;
721 } else if (mode == 'n') {
722 php_uname = buf.nodename;
723 } else if (mode == 'v') {
724 php_uname = buf.version;
725 } else if (mode == 'm') {
726 php_uname = buf.machine;
727 } else { /* assume mode == 'a' */
728 return strpprintf(0, "%s %s %s %s %s", buf.sysname, buf.nodename, buf.release, buf.version, buf.machine);
729 }
730 }
731#else
732 php_uname = PHP_UNAME;
733#endif
734#endif
735 return zend_string_init(php_uname, strlen(php_uname), 0);
736}
737/* }}} */
738
739/* {{{ php_print_info_htmlhead */
741{
742 php_info_print("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"DTD/xhtml1-transitional.dtd\">\n");
743 php_info_print("<html xmlns=\"http://www.w3.org/1999/xhtml\">");
744 php_info_print("<head>\n");
746 php_info_printf("<title>PHP %s - phpinfo()</title>", PHP_VERSION);
747 php_info_print("<meta name=\"ROBOTS\" content=\"NOINDEX,NOFOLLOW,NOARCHIVE\" />");
748 php_info_print("</head>\n");
749 php_info_print("<body><div class=\"center\">\n");
750}
751/* }}} */
752
753/* {{{ module_name_cmp */
754static int module_name_cmp(Bucket *f, Bucket *s)
755{
756 return strcasecmp(((zend_module_entry *)Z_PTR(f->val))->name,
757 ((zend_module_entry *)Z_PTR(s->val))->name);
758}
759/* }}} */
760
761/* {{{ php_print_info */
763{
764 char **env, *tmp1, *tmp2;
766
767 if (!sapi_module.phpinfo_as_text) {
769 } else {
770 php_info_print("phpinfo()\n");
771 }
772
773 if (flag & PHP_INFO_GENERAL) {
774 const char *zend_version = get_zend_version();
775 char temp_api[10];
776
778
779 if (!sapi_module.phpinfo_as_text) {
781 }
782
783 if (!sapi_module.phpinfo_as_text) {
784 time_t the_time;
785 struct tm *ta, tmbuf;
786
787 the_time = time(NULL);
788 ta = php_localtime_r(&the_time, &tmbuf);
789
790 php_info_print("<a href=\"https://www.php.net/\"><img src=\"");
791 if (ta && (ta->tm_mon==3) && (ta->tm_mday==1)) {
792 php_info_print(PHP_EGG_LOGO_DATA_URI "\" alt=\"PHP logo\" /></a>");
793 } else {
794 php_info_print(PHP_LOGO_DATA_URI "\" alt=\"PHP logo\" /></a>");
795 }
796 }
797
798 if (!sapi_module.phpinfo_as_text) {
799 php_info_printf("<h1 class=\"p\">PHP Version %s</h1>\n", PHP_VERSION);
800 } else {
801 php_info_print_table_row(2, "PHP Version", PHP_VERSION);
802 }
806 php_info_print_table_row(2, "Build Date", __DATE__ " " __TIME__);
807#ifdef PHP_BUILD_SYSTEM
808 php_info_print_table_row(2, "Build System", PHP_BUILD_SYSTEM);
809#endif
810#ifdef PHP_BUILD_PROVIDER
811 php_info_print_table_row(2, "Build Provider", PHP_BUILD_PROVIDER);
812#endif
813#ifdef PHP_BUILD_COMPILER
814 php_info_print_table_row(2, "Compiler", PHP_BUILD_COMPILER);
815#endif
816#ifdef PHP_BUILD_ARCH
817 php_info_print_table_row(2, "Architecture", PHP_BUILD_ARCH);
818#endif
819#ifdef CONFIGURE_COMMAND
820 php_info_print_table_row(2, "Configure Command", CONFIGURE_COMMAND );
821#endif
822
823 if (sapi_module.pretty_name) {
824 php_info_print_table_row(2, "Server API", sapi_module.pretty_name );
825 }
826
827#ifdef VIRTUAL_DIR
828 php_info_print_table_row(2, "Virtual Directory Support", "enabled" );
829#else
830 php_info_print_table_row(2, "Virtual Directory Support", "disabled" );
831#endif
832
833 php_info_print_table_row(2, "Configuration File (php.ini) Path", PHP_CONFIG_FILE_PATH);
834 php_info_print_table_row(2, "Loaded Configuration File", php_ini_opened_path ? php_ini_opened_path : "(none)");
835 php_info_print_table_row(2, "Scan this dir for additional .ini files", php_ini_scanned_path ? php_ini_scanned_path : "(none)");
836 php_info_print_table_row(2, "Additional .ini files parsed", php_ini_scanned_files ? php_ini_scanned_files : "(none)");
837
838 snprintf(temp_api, sizeof(temp_api), "%d", PHP_API_VERSION);
839 php_info_print_table_row(2, "PHP API", temp_api);
840
841 snprintf(temp_api, sizeof(temp_api), "%d", ZEND_MODULE_API_NO);
842 php_info_print_table_row(2, "PHP Extension", temp_api);
843
844 snprintf(temp_api, sizeof(temp_api), "%d", ZEND_EXTENSION_API_NO);
845 php_info_print_table_row(2, "Zend Extension", temp_api);
846
847 php_info_print_table_row(2, "Zend Extension Build", ZEND_EXTENSION_BUILD_ID);
848 php_info_print_table_row(2, "PHP Extension Build", ZEND_MODULE_BUILD_ID);
849
850 snprintf(temp_api, sizeof(temp_api), "%d bits", SIZEOF_ZEND_LONG * 8);
851 php_info_print_table_row(2, "PHP Integer Size", temp_api);
852
853#if ZEND_DEBUG
854 php_info_print_table_row(2, "Debug Build", "yes" );
855#else
856 php_info_print_table_row(2, "Debug Build", "no" );
857#endif
858
859#ifdef ZTS
860 php_info_print_table_row(2, "Thread Safety", "enabled" );
861 php_info_print_table_row(2, "Thread API", tsrm_api_name() );
862#else
863 php_info_print_table_row(2, "Thread Safety", "disabled" );
864#endif
865
866#ifdef ZEND_SIGNALS
867 php_info_print_table_row(2, "Zend Signal Handling", "enabled" );
868#else
869 php_info_print_table_row(2, "Zend Signal Handling", "disabled" );
870#endif
871
872 php_info_print_table_row(2, "Zend Memory Manager", is_zend_mm() ? "enabled" : "disabled" );
873
874 {
876 char *descr;
877 if (functions) {
878 spprintf(&descr, 0, "provided by %s", functions->provider_name);
879 } else {
880 descr = estrdup("disabled");
881 }
882 php_info_print_table_row(2, "Zend Multibyte Support", descr);
883 efree(descr);
884 }
885
886#ifdef ZEND_MAX_EXECUTION_TIMERS
887 php_info_print_table_row(2, "Zend Max Execution Timers", "enabled" );
888#else
889 php_info_print_table_row(2, "Zend Max Execution Timers", "disabled" );
890#endif
891
892#ifdef HAVE_IPV6
893 php_info_print_table_row(2, "IPv6 Support", "enabled" );
894#else
895 php_info_print_table_row(2, "IPv6 Support", "disabled" );
896#endif
897
898#ifdef HAVE_DTRACE
899 php_info_print_table_row(2, "DTrace Support", (zend_dtrace_enabled ? "enabled" : "available, disabled"));
900#else
901 php_info_print_table_row(2, "DTrace Support", "disabled" );
902#endif
903
904 php_info_print_stream_hash("PHP Streams", php_stream_get_url_stream_wrappers_hash());
905 php_info_print_stream_hash("Stream Socket Transports", php_stream_xport_get_hash());
906 php_info_print_stream_hash("Stream Filters", php_get_stream_filters_hash());
907
909
910 /* Zend Engine */
912 if (!sapi_module.phpinfo_as_text) {
913 php_info_print("<a href=\"https://www.zend.com/\"><img src=\"");
914 php_info_print(ZEND_LOGO_DATA_URI "\" alt=\"Zend logo\" /></a>\n");
915 }
916 php_info_print("This program makes use of the Zend Scripting Language Engine:");
917 php_info_print(!sapi_module.phpinfo_as_text?"<br />":"\n");
918 if (sapi_module.phpinfo_as_text) {
919 php_info_print(zend_version);
920 } else {
922 }
924 zend_string_free(php_uname);
925 }
926
928
929 if (flag & PHP_INFO_CONFIGURATION) {
931 if (!sapi_module.phpinfo_as_text) {
932 php_info_print("<h1>Configuration</h1>\n");
933 } else {
934 SECTION("Configuration");
935 }
936 if (!(flag & PHP_INFO_MODULES)) {
937 SECTION("PHP Core");
939 }
940 }
941
942 if (flag & PHP_INFO_MODULES) {
943 HashTable sorted_registry;
944 zend_module_entry *module;
945
946 zend_hash_init(&sorted_registry, zend_hash_num_elements(&module_registry), NULL, NULL, 1);
947 zend_hash_copy(&sorted_registry, &module_registry, NULL);
948 zend_hash_sort(&sorted_registry, module_name_cmp, 0);
949
950 ZEND_HASH_MAP_FOREACH_PTR(&sorted_registry, module) {
951 if (module->info_func || module->version) {
952 php_info_print_module(module);
953 }
955
956 SECTION("Additional Modules");
958 php_info_print_table_header(1, "Module Name");
959 ZEND_HASH_MAP_FOREACH_PTR(&sorted_registry, module) {
960 if (!module->info_func && !module->version) {
961 php_info_print_module(module);
962 }
965
966 zend_hash_destroy(&sorted_registry);
967 }
968
969 if (flag & PHP_INFO_ENVIRONMENT) {
970 SECTION("Environment");
972 php_info_print_table_header(2, "Variable", "Value");
973 tsrm_env_lock();
974 for (env=environ; env!=NULL && *env !=NULL; env++) {
975 tmp1 = estrdup(*env);
976 if (!(tmp2=strchr(tmp1,'='))) { /* malformed entry? */
977 efree(tmp1);
978 continue;
979 }
980 *tmp2 = 0;
981 tmp2++;
983 efree(tmp1);
984 }
985 tsrm_env_unlock();
987 }
988
989 if (flag & PHP_INFO_VARIABLES) {
990 zval *data;
991
992 SECTION("PHP Variables");
993
995 php_info_print_table_header(2, "Variable", "Value");
996 if ((data = zend_hash_str_find(&EG(symbol_table), "PHP_SELF", sizeof("PHP_SELF")-1)) != NULL && Z_TYPE_P(data) == IS_STRING) {
998 }
999 if ((data = zend_hash_str_find(&EG(symbol_table), "PHP_AUTH_TYPE", sizeof("PHP_AUTH_TYPE")-1)) != NULL && Z_TYPE_P(data) == IS_STRING) {
1000 php_info_print_table_row(2, "PHP_AUTH_TYPE", Z_STRVAL_P(data));
1001 }
1002 if ((data = zend_hash_str_find(&EG(symbol_table), "PHP_AUTH_USER", sizeof("PHP_AUTH_USER")-1)) != NULL && Z_TYPE_P(data) == IS_STRING) {
1003 php_info_print_table_row(2, "PHP_AUTH_USER", Z_STRVAL_P(data));
1004 }
1005 if ((data = zend_hash_str_find(&EG(symbol_table), "PHP_AUTH_PW", sizeof("PHP_AUTH_PW")-1)) != NULL && Z_TYPE_P(data) == IS_STRING) {
1006 php_info_print_table_row(2, "PHP_AUTH_PW", Z_STRVAL_P(data));
1007 }
1008 php_print_gpcse_array(ZEND_STRL("_REQUEST"));
1009 php_print_gpcse_array(ZEND_STRL("_GET"));
1010 php_print_gpcse_array(ZEND_STRL("_POST"));
1011 php_print_gpcse_array(ZEND_STRL("_FILES"));
1012 php_print_gpcse_array(ZEND_STRL("_COOKIE"));
1013 php_print_gpcse_array(ZEND_STRL("_SERVER"));
1014 php_print_gpcse_array(ZEND_STRL("_ENV"));
1016 }
1017
1018
1019 if (flag & PHP_INFO_CREDITS) {
1022 }
1023
1024 if (flag & PHP_INFO_LICENSE) {
1025 if (!sapi_module.phpinfo_as_text) {
1026 SECTION("PHP License");
1028 php_info_print("<p>\n");
1029 php_info_print("This program is free software; you can redistribute it and/or modify ");
1030 php_info_print("it under the terms of the PHP License as published by the PHP Group ");
1031 php_info_print("and included in the distribution in the file: LICENSE\n");
1032 php_info_print("</p>\n");
1033 php_info_print("<p>");
1034 php_info_print("This program is distributed in the hope that it will be useful, ");
1035 php_info_print("but WITHOUT ANY WARRANTY; without even the implied warranty of ");
1036 php_info_print("MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n");
1037 php_info_print("</p>\n");
1038 php_info_print("<p>");
1039 php_info_print("If you did not receive a copy of the PHP license, or have any questions about ");
1040 php_info_print("PHP licensing, please contact license@php.net.\n");
1041 php_info_print("</p>\n");
1043 } else {
1044 php_info_print("\nPHP License\n");
1045 php_info_print("This program is free software; you can redistribute it and/or modify\n");
1046 php_info_print("it under the terms of the PHP License as published by the PHP Group\n");
1047 php_info_print("and included in the distribution in the file: LICENSE\n");
1048 php_info_print("\n");
1049 php_info_print("This program is distributed in the hope that it will be useful,\n");
1050 php_info_print("but WITHOUT ANY WARRANTY; without even the implied warranty of\n");
1051 php_info_print("MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n");
1052 php_info_print("\n");
1053 php_info_print("If you did not receive a copy of the PHP license, or have any\n");
1054 php_info_print("questions about PHP licensing, please contact license@php.net.\n");
1055 }
1056 }
1057
1058 if (!sapi_module.phpinfo_as_text) {
1059 php_info_print("</div></body></html>");
1060 }
1061}
1062/* }}} */
1063
1065{
1066 if (!sapi_module.phpinfo_as_text) {
1067 php_info_print("<table>\n");
1068 } else {
1069 php_info_print("\n");
1070 }
1071}
1072/* }}} */
1073
1075{
1076 if (!sapi_module.phpinfo_as_text) {
1077 php_info_print("</table>\n");
1078 }
1079
1080}
1081/* }}} */
1082
1084{
1086 if (flag) {
1087 if (!sapi_module.phpinfo_as_text) {
1088 php_info_print("<tr class=\"h\"><td>\n");
1089 }
1090 } else {
1091 if (!sapi_module.phpinfo_as_text) {
1092 php_info_print("<tr class=\"v\"><td>\n");
1093 } else {
1094 php_info_print("\n");
1095 }
1096 }
1097}
1098/* }}} */
1099
1101{
1102 if (!sapi_module.phpinfo_as_text) {
1103 php_info_print("</td></tr>\n");
1104 }
1106}
1107/* }}} */
1108
1110{
1111 if (!sapi_module.phpinfo_as_text) {
1112 php_info_print("<hr />\n");
1113 } else {
1114 php_info_print("\n\n _______________________________________________________________________\n\n");
1115 }
1116}
1117/* }}} */
1118
1119PHPAPI ZEND_COLD void php_info_print_table_colspan_header(int num_cols, const char *header) /* {{{ */
1120{
1121 int spaces;
1122
1123 if (!sapi_module.phpinfo_as_text) {
1124 php_info_printf("<tr class=\"h\"><th colspan=\"%d\">%s</th></tr>\n", num_cols, header );
1125 } else {
1126 spaces = (int)(74 - strlen(header));
1127 php_info_printf("%*s%s%*s\n", (int)(spaces/2), " ", header, (int)(spaces/2), " ");
1128 }
1129}
1130/* }}} */
1131
1132/* {{{ php_info_print_table_header */
1134{
1135 int i;
1136 va_list row_elements;
1137 char *row_element;
1138
1139 va_start(row_elements, num_cols);
1140 if (!sapi_module.phpinfo_as_text) {
1141 php_info_print("<tr class=\"h\">");
1142 }
1143 for (i=0; i<num_cols; i++) {
1144 row_element = va_arg(row_elements, char *);
1145 if (!row_element || !*row_element) {
1146 row_element = " ";
1147 }
1148 if (!sapi_module.phpinfo_as_text) {
1149 php_info_print("<th>");
1150 php_info_print(row_element);
1151 php_info_print("</th>");
1152 } else {
1153 php_info_print(row_element);
1154 if (i < num_cols-1) {
1155 php_info_print(" => ");
1156 } else {
1157 php_info_print("\n");
1158 }
1159 }
1160 }
1161 if (!sapi_module.phpinfo_as_text) {
1162 php_info_print("</tr>\n");
1163 }
1164
1165 va_end(row_elements);
1166}
1167/* }}} */
1168
1169/* {{{ php_info_print_table_row_internal */
1170static ZEND_COLD void php_info_print_table_row_internal(int num_cols,
1171 const char *value_class, va_list row_elements)
1172{
1173 int i;
1174 char *row_element;
1175
1176 if (!sapi_module.phpinfo_as_text) {
1177 php_info_print("<tr>");
1178 }
1179 for (i=0; i<num_cols; i++) {
1180 if (!sapi_module.phpinfo_as_text) {
1181 php_info_printf("<td class=\"%s\">",
1182 (i==0 ? "e" : value_class )
1183 );
1184 }
1185 row_element = va_arg(row_elements, char *);
1186 if (!row_element || !*row_element) {
1187 if (!sapi_module.phpinfo_as_text) {
1188 php_info_print( "<i>no value</i>" );
1189 } else {
1190 php_info_print( " " );
1191 }
1192 } else {
1193 if (!sapi_module.phpinfo_as_text) {
1194 php_info_print_html_esc(row_element, strlen(row_element));
1195 } else {
1196 php_info_print(row_element);
1197 if (i < num_cols-1) {
1198 php_info_print(" => ");
1199 }
1200 }
1201 }
1202 if (!sapi_module.phpinfo_as_text) {
1203 php_info_print(" </td>");
1204 } else if (i == (num_cols - 1)) {
1205 php_info_print("\n");
1206 }
1207 }
1208 if (!sapi_module.phpinfo_as_text) {
1209 php_info_print("</tr>\n");
1210 }
1211}
1212/* }}} */
1213
1214/* {{{ php_info_print_table_row */
1216{
1217 va_list row_elements;
1218
1219 va_start(row_elements, num_cols);
1220 php_info_print_table_row_internal(num_cols, "v", row_elements);
1221 va_end(row_elements);
1222}
1223/* }}} */
1224
1225/* {{{ php_info_print_table_row_ex */
1226PHPAPI ZEND_COLD void php_info_print_table_row_ex(int num_cols, const char *value_class,
1227 ...)
1228{
1229 va_list row_elements;
1230
1231 va_start(row_elements, value_class);
1232 php_info_print_table_row_internal(num_cols, value_class, row_elements);
1233 va_end(row_elements);
1234}
1235/* }}} */
1236
1237/* {{{ Output a page of useful information about PHP and the current request */
1239{
1240 zend_long flag = PHP_INFO_ALL;
1241
1244 Z_PARAM_LONG(flag)
1246
1247 /* Andale! Andale! Yee-Hah! */
1249 php_print_info((int)flag);
1251
1253}
1254
1255/* }}} */
1256
1257/* {{{ Return the current PHP version */
1259{
1260 char *ext_name = NULL;
1261 size_t ext_name_len = 0;
1262
1265 Z_PARAM_STRING_OR_NULL(ext_name, ext_name_len)
1267
1268 if (!ext_name) {
1270 } else {
1271 const char *version;
1272 version = zend_get_module_version(ext_name);
1273 if (version == NULL) {
1275 }
1276 RETURN_STRING(version);
1277 }
1278}
1279/* }}} */
1280
1281/* {{{ Prints the list of people who've contributed to the PHP project */
1294/* }}} */
1295
1296/* {{{ Return the current SAPI module name */
1298{
1300
1301 if (sapi_module.name) {
1303 } else {
1305 }
1306}
1307
1308/* }}} */
1309
1310/* {{{ Return information about the system PHP was built on */
1312{
1313 char *mode_str = "a";
1314 size_t modelen = sizeof("a")-1;
1315
1318 Z_PARAM_STRING(mode_str, modelen)
1320
1321 if (modelen != 1) {
1322 zend_argument_value_error(1, "must be a single character");
1323 RETURN_THROWS();
1324 }
1325
1326 char mode = *mode_str;
1327 if (!php_is_valid_uname_mode(mode)) {
1328 zend_argument_value_error(1, "must be one of \"a\", \"m\", \"n\", \"r\", \"s\", or \"v\"");
1329 RETURN_THROWS();
1330 }
1331
1333}
1334
1335/* }}} */
1336
1337/* {{{ Return comma-separated string of .ini files parsed from the additional ini dir */
1348/* }}} */
1349
1350/* {{{ Return the actual loaded ini filename */
1361/* }}} */
SAPI_API sapi_module_struct sapi_module
Definition SAPI.c:65
size_t len
Definition apprentice.c:174
phpinfo(int $flags=INFO_ALL)
php_uname(string $mode="a")
phpcredits(int $flags=CREDITS_ALL)
phpversion(?string $extension=null)
header(string $header, bool $replace=true, int $response_code=0)
php_ini_loaded_file()
strchr(string $haystack, string $needle, bool $before_needle=false)
char s[4]
Definition cdf.c:77
PHPAPI ZEND_COLD void php_print_credits(int flag)
Definition credits.c:24
#define PHP_CREDITS_ALL
Definition credits.h:32
#define PHP_CREDITS_FULLPAGE
Definition credits.h:29
#define DWORD
Definition exif.c:1762
HashTable * ht
Definition ffi.c:4838
zend_ffi_ctype_name_buf buf
Definition ffi.c:4685
#define major(dev)
Definition fsmagic.c:65
char * mode
#define NULL
Definition gdcache.h:45
PHPAPI zend_string * php_escape_html_entities(const unsigned char *old, size_t oldlen, int all, int flags, const char *hint_charset)
Definition html.c:1012
PHPAPI ZEND_COLD void php_info_print_table_row(int num_cols,...)
Definition info.c:1215
PHPAPI ZEND_COLD void php_info_print_table_colspan_header(int num_cols, const char *header)
Definition info.c:1119
PHPAPI ZEND_COLD void php_info_print_table_end(void)
Definition info.c:1074
PHPAPI ZEND_COLD void php_info_print_box_end(void)
Definition info.c:1100
PHPAPI ZEND_COLD void php_info_print_table_header(int num_cols,...)
Definition info.c:1133
PHPAPI ZEND_COLD void ZEND_COLD php_info_print_style(void)
Definition info.c:242
PHPAPI ZEND_COLD void php_print_info_htmlhead(void)
Definition info.c:740
PHPAPI ZEND_COLD void php_info_print_hr(void)
Definition info.c:1109
PHPAPI ZEND_COLD void php_info_print_box_start(int flag)
Definition info.c:1083
PHPAPI ZEND_COLD void php_info_print_table_start(void)
Definition info.c:1064
#define SECTION(name)
Definition info.c:42
PHPAPI ZEND_COLD void php_info_print_table_row_ex(int num_cols, const char *value_class,...)
Definition info.c:1226
PHPAPI zend_string * php_get_uname(char mode)
Definition info.c:655
PHPAPI ZEND_COLD void php_info_print_module(zend_module_entry *zend_module)
Definition info.c:133
PHPAPI ZEND_COLD void php_print_info(int flag)
Definition info.c:762
#define PHP_INFO_MODULES
Definition info.h:29
#define PHP_INFO_LICENSE
Definition info.h:32
#define PHP_INFO_ALL
Definition info.h:33
#define PHP_INFO_CREDITS
Definition info.h:27
#define PHP_EGG_LOGO_DATA_URI
Definition info.h:51
#define ZEND_LOGO_DATA_URI
Definition info.h:52
#define PHP_INFO_VARIABLES
Definition info.h:31
#define PHP_INFO_CONFIGURATION
Definition info.h:28
#define PHP_INFO_ENVIRONMENT
Definition info.h:30
#define PHP_LOGO_DATA_URI
Definition info.h:50
#define PHP_INFO_GENERAL
Definition info.h:26
const PHP_CONFIG_FILE_PATH
PHPAPI size_t php_output_write(const char *str, size_t len)
Definition output.c:237
PHPAPI zend_result php_output_end(void)
Definition output.c:311
PHPAPI zend_result php_output_start_default(void)
Definition output.c:398
#define PHP_FUNCTION
Definition php.h:364
char ** environ
#define PHP_API_VERSION
Definition php.h:25
#define PHPAPI
Definition php.h:71
time()
PHPAPI char * php_ini_scanned_files
Definition php_ini.c:66
PHPAPI char * php_ini_scanned_path
Definition php_ini.c:65
PHPAPI char * php_ini_opened_path
Definition php_ini.c:63
PHPAPI struct tm * php_localtime_r(const time_t *const timep, struct tm *p_tm)
Definition reentrancy.c:110
unsigned char key[REFLECTION_KEY_LEN]
PHPAPI HashTable * php_stream_xport_get_hash(void)
Definition transports.c:23
#define php_get_stream_filters_hash()
#define php_stream_get_url_stream_wrappers_hash()
#define PHP_VERSION
Definition php_version.h:7
HashTable functions
zend_constant * data
#define tmp1
#define vspprintf
Definition spprintf.h:31
#define strpprintf
Definition spprintf.h:30
#define spprintf
Definition spprintf.h:29
PHPAPI ZEND_COLD void php_info_print_css(void)
Definition css.c:20
#define ENT_QUOTES
Definition html.h:37
zval val
Definition zend_types.h:381
const char * name
void(* info_func)(ZEND_MODULE_INFO_FUNC_ARGS)
const char * version
PHPAPI zend_string * php_url_encode(char const *s, size_t len)
Definition url.c:546
#define PRODUCT_ULTIMATE_N
Definition winver.h:49
#define PRODUCT_SB_SOLUTION_SERVER_EM
Definition winver.h:75
#define VER_NT_WORKSTATION
Definition winver.h:100
#define PRODUCT_HOME_BASIC
Definition winver.h:23
#define PRODUCT_MEDIUMBUSINESS_SERVER_MANAGEMENT
Definition winver.h:51
#define PRODUCT_STORAGE_STANDARD_SERVER
Definition winver.h:42
#define PRODUCT_SB_SOLUTION_SERVER
Definition winver.h:71
#define PRODUCT_ESSENTIALBUSINESS_SERVER_MGMTSVC
Definition winver.h:80
#define PRODUCT_MULTIPOINT_PREMIUM_SERVER
Definition winver.h:86
#define PRODUCT_DATACENTER_EVALUATION_SERVER
Definition winver.h:88
#define PRODUCT_SERVER_FOR_SMALLBUSINESS_V
Definition winver.h:56
#define PRODUCT_WEB_SERVER_CORE
Definition winver.h:50
#define PRODUCT_WEB_SERVER
Definition winver.h:38
#define PRODUCT_STORAGE_ENTERPRISE_SERVER_CORE
Definition winver.h:67
#define PRODUCT_ESSENTIALBUSINESS_SERVER_ADDL
Definition winver.h:79
#define PRODUCT_HOME_PREMIUM
Definition winver.h:24
#define PRODUCT_BUSINESS_N
Definition winver.h:37
#define PRODUCT_STARTER
Definition winver.h:32
#define PRODUCT_ENTERPRISE_SERVER_IA64
Definition winver.h:36
#define PRODUCT_SERVER_FOR_SMALLBUSINESS
Definition winver.h:45
#define PRODUCT_CORE
Definition winver.h:95
#define PRODUCT_STORAGE_EXPRESS_SERVER_CORE
Definition winver.h:64
#define PRODUCT_ENTERPRISE_N_EVALUATION
Definition winver.h:89
#define PRODUCT_STORAGE_STANDARD_SERVER_CORE
Definition winver.h:65
#define PRODUCT_ENTERPRISE_SERVER
Definition winver.h:31
#define PRODUCT_HOME_BASIC_N
Definition winver.h:26
#define PRODUCT_ENTERPRISE_N
Definition winver.h:48
#define PRODUCT_BUSINESS
Definition winver.h:27
#define PRODUCT_CORE_SINGLELANGUAGE
Definition winver.h:94
#define PRODUCT_DATACENTER_SERVER_CORE_V
Definition winver.h:60
#define PRODUCT_STORAGE_WORKGROUP_SERVER
Definition winver.h:43
#define PRODUCT_PROFESSIONAL_WMC
Definition winver.h:96
#define PRODUCT_SOLUTION_EMBEDDEDSERVER
Definition winver.h:77
#define PRODUCT_CORE_COUNTRYSPECIFIC
Definition winver.h:93
#define PRODUCT_HOME_PREMIUM_SERVER
Definition winver.h:55
#define PRODUCT_SERVER_FOR_SB_SOLUTIONS_EM
Definition winver.h:76
#define PRODUCT_STANDARD_SERVER_CORE
Definition winver.h:34
#define PRODUCT_STANDARD_SERVER_V
Definition winver.h:57
#define PRODUCT_SMALLBUSINESS_SERVER
Definition winver.h:30
#define PRODUCT_STANDARD_SERVER_SOLUTIONS
Definition winver.h:73
#define PRODUCT_CLUSTER_SERVER_V
Definition winver.h:83
#define PRODUCT_STANDARD_SERVER
Definition winver.h:28
#define PRODUCT_CORE_N
Definition winver.h:92
#define PRODUCT_CLUSTER_SERVER
Definition winver.h:39
#define PRODUCT_ENTERPRISE_EVALUATION
Definition winver.h:84
#define PRODUCT_SMALLBUSINESS_SERVER_PREMIUM_CORE
Definition winver.h:82
#define PRODUCT_DATACENTER_SERVER
Definition winver.h:29
#define PRODUCT_ENTERPRISE_SERVER_CORE_V
Definition winver.h:62
#define PRODUCT_STORAGE_EXPRESS_SERVER
Definition winver.h:41
#define PRODUCT_MEDIUMBUSINESS_SERVER_MESSAGING
Definition winver.h:53
#define PRODUCT_STORAGE_WORKGROUP_SERVER_CORE
Definition winver.h:66
#define PRODUCT_PROFESSIONAL_N
Definition winver.h:70
#define PRODUCT_ESSENTIALBUSINESS_SERVER_MGMT
Definition winver.h:78
#define PRODUCT_SERVER_FOR_SB_SOLUTIONS
Definition winver.h:72
#define PRODUCT_HOME_SERVER
Definition winver.h:40
#define PRODUCT_DATACENTER_SERVER_V
Definition winver.h:58
#define PRODUCT_ENTERPRISE
Definition winver.h:25
#define PRODUCT_ENTERPRISE_SERVER_V
Definition winver.h:59
#define PRODUCT_MULTIPOINT_STANDARD_SERVER
Definition winver.h:85
#define PROCESSOR_ARCHITECTURE_AMD64
Definition winver.h:130
#define PRODUCT_STANDARD_SERVER_CORE_V
Definition winver.h:61
#define PRODUCT_STORAGE_STANDARD_EVALUATION_SERVER
Definition winver.h:91
#define PRODUCT_DATACENTER_SERVER_CORE
Definition winver.h:33
#define PRODUCT_ESSENTIALBUSINESS_SERVER_ADDLSVC
Definition winver.h:81
#define PRODUCT_HOME_PREMIUM_N
Definition winver.h:47
#define PRODUCT_ENTERPRISE_SERVER_CORE
Definition winver.h:35
#define PRODUCT_SMALLBUSINESS_SERVER_PREMIUM
Definition winver.h:46
#define PRODUCT_STANDARD_EVALUATION_SERVER
Definition winver.h:87
#define PRODUCT_STORAGE_ENTERPRISE_SERVER
Definition winver.h:44
#define PRODUCT_STANDARD_SERVER_SOLUTIONS_CORE
Definition winver.h:74
#define PRODUCT_ULTIMATE
Definition winver.h:22
#define PRODUCT_PROFESSIONAL
Definition winver.h:69
#define PRODUCT_STARTER_N
Definition winver.h:68
#define PRODUCT_STORAGE_WORKGROUP_EVALUATION_SERVER
Definition winver.h:90
#define PRODUCT_MEDIUMBUSINESS_SERVER_SECURITY
Definition winver.h:52
#define PRODUCT_SERVER_FOUNDATION
Definition winver.h:54
#define PRODUCT_HYPERV
Definition winver.h:63
ZEND_API zend_string * zend_print_zval_r_to_str(zval *expr, int indent)
Definition zend.c:616
ZEND_API void zend_print_zval_r(zval *expr, int indent)
Definition zend.c:625
ZEND_API const char * get_zend_version(void)
Definition zend.c:1306
ZEND_API bool zend_dtrace_enabled
Definition zend.c:74
ZEND_API HashTable module_registry
Definition zend_API.c:41
ZEND_API const char * zend_get_module_version(const char *module_name)
Definition zend_API.c:4486
ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char *format,...)
Definition zend_API.c:433
#define RETURN_STRING(s)
Definition zend_API.h:1043
#define ZEND_PARSE_PARAMETERS_END()
Definition zend_API.h:1641
#define RETURN_FALSE
Definition zend_API.h:1058
#define ZEND_PARSE_PARAMETERS_NONE()
Definition zend_API.h:1623
#define Z_PARAM_OPTIONAL
Definition zend_API.h:1667
#define Z_PARAM_STRING(dest, dest_len)
Definition zend_API.h:2071
#define Z_PARAM_STRING_OR_NULL(dest, dest_len)
Definition zend_API.h:2074
#define ZEND_PARSE_PARAMETERS_START(min_num_args, max_num_args)
Definition zend_API.h:1620
#define Z_PARAM_LONG(dest)
Definition zend_API.h:1896
#define RETURN_THROWS()
Definition zend_API.h:1060
#define RETURN_STR(s)
Definition zend_API.h:1039
#define RETURN_TRUE
Definition zend_API.h:1059
ZEND_API bool is_zend_mm(void)
#define efree(ptr)
Definition zend_alloc.h:155
#define estrdup(s)
Definition zend_alloc.h:164
struct _zval_struct zval
strlen(string $string)
strncmp(string $string1, string $string2, int $length)
zend_string_release_ex(func->internal_function.function_name, 0)
ZEND_API bool zend_is_auto_global(zend_string *name)
#define strcasecmp(s1, s2)
#define snprintf
#define ZEND_EXTENSION_BUILD_ID
#define ZEND_EXTENSION_API_NO
#define EG(v)
ZEND_API void ZEND_FASTCALL zend_hash_destroy(HashTable *ht)
Definition zend_hash.c:1727
ZEND_API zval *ZEND_FASTCALL zend_hash_str_find(const HashTable *ht, const char *str, size_t len)
Definition zend_hash.c:2689
ZEND_API void ZEND_FASTCALL zend_hash_copy(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor)
Definition zend_hash.c:2240
#define zend_hash_init(ht, nSize, pHashFunction, pDestructor, persistent)
Definition zend_hash.h:108
#define ZEND_HASH_MAP_FOREACH_PTR(ht, _ptr)
Definition zend_hash.h:1326
#define HT_IS_PACKED(ht)
Definition zend_hash.h:59
#define ZEND_HASH_FOREACH_KEY_VAL(ht, _h, _key, _val)
Definition zend_hash.h:1181
#define ZEND_HASH_MAP_FOREACH_STR_KEY(ht, _key)
Definition zend_hash.h:1346
#define ZEND_HASH_FOREACH_END()
Definition zend_hash.h:1086
ZEND_API void zend_html_puts(const char *s, size_t len)
ZEND_API void zend_ini_sort_entries(void)
Definition zend_ini.c:195
ZEND_API void display_ini_entries(zend_module_entry *module)
Definition php_ini.c:116
#define DISPLAY_INI_ENTRIES()
Definition zend_ini.h:205
#define ZEND_ULONG_FMT
Definition zend_long.h:88
int32_t zend_long
Definition zend_long.h:42
uint32_t zend_ulong
Definition zend_long.h:43
#define SIZEOF_ZEND_LONG
Definition zend_long.h:50
struct _zend_string zend_string
#define ZEND_MODULE_API_NO
#define ZEND_MODULE_BUILD_ID
struct _zend_module_entry zend_module_entry
ZEND_API const zend_multibyte_functions * zend_multibyte_get_functions(void)
struct _zend_multibyte_functions zend_multibyte_functions
ZEND_API void ZEND_FASTCALL zend_str_tolower(char *str, size_t length)
#define zend_always_inline
#define ZEND_ASSERT(c)
#define ZEND_UNREACHABLE()
#define ZEND_STRL(str)
#define ZEND_COLD
#define ZSTR_VAL(zstr)
Definition zend_string.h:68
#define ZSTR_LEN(zstr)
Definition zend_string.h:69
#define Z_TYPE_P(zval_p)
Definition zend_types.h:660
#define Z_STRVAL_P(zval_p)
Definition zend_types.h:975
#define Z_ARRVAL_P(zval_p)
Definition zend_types.h:987
#define ZVAL_DEREF(z)
#define IS_STRING
Definition zend_types.h:606
struct _zend_array HashTable
Definition zend_types.h:386
#define IS_ARRAY
Definition zend_types.h:607
#define Z_PTR(zval)
struct _Bucket Bucket
zval retval
zend_string * name