1 /*
2 	+----------------------------------------------------------------------+
3 	| PHP Version 7                                                        |
4 	+----------------------------------------------------------------------+
5 	| Copyright (c) The PHP Group                                          |
6 	+----------------------------------------------------------------------+
7 	| This source file is subject to version 3.01 of the PHP license,      |
8 	| that is bundled with this package in the file LICENSE, and is        |
9 	| available through the world-wide-web at the following url:           |
10 	| http://www.php.net/license/3_01.txt                                  |
11 	| If you did not receive a copy of the PHP license and are unable to   |
12 	| obtain it through the world-wide-web, please send a note to          |
13 	| license@php.net so we can mail you a copy immediately.               |
14 	+----------------------------------------------------------------------+
15 	| Authors: Andi Gutmans <andi@php.net>                                 |
16 	|          Zeev Suraski <zeev@php.net>                                 |
17 	+----------------------------------------------------------------------+
18 */
19 
20 /* {{{ includes
21  */
22 #include "php.h"
23 #include "php_main.h"
24 #include "zend_modules.h"
25 #include "zend_compile.h"
26 #include <stdarg.h>
27 #include <stdlib.h>
28 #include <stdio.h>
29 
30 #include "ext/standard/dl.h"
31 #include "ext/standard/file.h"
32 #include "ext/standard/fsock.h"
33 #include "ext/standard/head.h"
34 #include "ext/standard/pack.h"
35 #include "ext/standard/php_browscap.h"
36 #include "ext/standard/php_crypt.h"
37 #include "ext/standard/php_dir.h"
38 #include "ext/standard/php_filestat.h"
39 #include "ext/standard/php_mail.h"
40 #include "ext/standard/php_ext_syslog.h"
41 #include "ext/standard/php_standard.h"
42 #include "ext/standard/php_lcg.h"
43 #include "ext/standard/php_array.h"
44 #include "ext/standard/php_assert.h"
45 #include "ext/reflection/php_reflection.h"
46 #if HAVE_BCMATH
47 #include "ext/bcmath/php_bcmath.h"
48 #endif
49 #if HAVE_CALENDAR
50 #include "ext/calendar/php_calendar.h"
51 #endif
52 #if HAVE_CTYPE
53 #include "ext/ctype/php_ctype.h"
54 #endif
55 #include "ext/date/php_date.h"
56 #if HAVE_FTP
57 #include "ext/ftp/php_ftp.h"
58 #endif
59 #if HAVE_ICONV
60 #include "ext/iconv/php_iconv.h"
61 #endif
62 #include "ext/standard/reg.h"
63 #include "ext/pcre/php_pcre.h"
64 #if HAVE_UODBC
65 #include "ext/odbc/php_odbc.h"
66 #endif
67 #if HAVE_PHP_SESSION
68 #include "ext/session/php_session.h"
69 #endif
70 #if HAVE_MBSTRING
71 #include "ext/mbstring/mbstring.h"
72 #endif
73 #if HAVE_TOKENIZER
74 #include "ext/tokenizer/php_tokenizer.h"
75 #endif
76 #if HAVE_ZLIB
77 #include "ext/zlib/php_zlib.h"
78 #endif
79 #if HAVE_LIBXML
80 #include "ext/libxml/php_libxml.h"
81 #if HAVE_DOM
82 #include "ext/dom/php_dom.h"
83 #endif
84 #if HAVE_SIMPLEXML
85 #include "ext/simplexml/php_simplexml.h"
86 #endif
87 #endif
88 #if HAVE_XML
89 #include "ext/xml/php_xml.h"
90 #endif
91 #include "ext/com_dotnet/php_com_dotnet.h"
92 #include "ext/spl/php_spl.h"
93 #if HAVE_XML && HAVE_XMLREADER
94 #include "ext/xmlreader/php_xmlreader.h"
95 #endif
96 #if HAVE_XML && HAVE_XMLWRITER
97 #include "ext/xmlwriter/php_xmlwriter.h"
98 #endif
99 /* }}} */
100 
101 /* {{{ php_builtin_extensions[]
102  */
103 static zend_module_entry * const php_builtin_extensions[] = {
104 	phpext_standard_ptr
105 #if HAVE_BCMATH
106 	,phpext_bcmath_ptr
107 #endif
108 #if HAVE_CALENDAR
109 	,phpext_calendar_ptr
110 #endif
111 	,phpext_com_dotnet_ptr
112 #if HAVE_CTYPE
113 	,phpext_ctype_ptr
114 #endif
115 	,phpext_date_ptr
116 #if HAVE_FTP
117 	,phpext_ftp_ptr
118 #endif
119 	,phpext_hash_ptr
120 #if HAVE_ICONV
121 	,phpext_iconv_ptr
122 #endif
123 #if HAVE_MBSTRING
124 	,phpext_mbstring_ptr
125 #endif
126 #if HAVE_UODBC
127 	,phpext_odbc_ptr
128 #endif
129 	,phpext_pcre_ptr
130 	,phpext_reflection_ptr
131 #if HAVE_PHP_SESSION
132 	,phpext_session_ptr
133 #endif
134 #if HAVE_TOKENIZER
135 	,phpext_tokenizer_ptr
136 #endif
137 #if HAVE_ZLIB
138 	,phpext_zlib_ptr
139 #endif
140 #if HAVE_LIBXML
141 	,phpext_libxml_ptr
142 #if HAVE_DOM
143 	,phpext_dom_ptr
144 #endif
145 #if HAVE_SIMPLEXML
146 	,phpext_simplexml_ptr
147 #endif
148 #endif
149 #if HAVE_XML
150 	,phpext_xml_ptr
151 #endif
152 	,phpext_spl_ptr
153 #if HAVE_XML && HAVE_XMLREADER
154 	,phpext_xmlreader_ptr
155 #endif
156 #if HAVE_XML && HAVE_XMLWRITER
157 	,phpext_xmlwriter_ptr
158 #endif
159 };
160 /* }}} */
161 
162 #define EXTCOUNT (sizeof(php_builtin_extensions)/sizeof(zend_module_entry *))
163 
php_register_internal_extensions(void)164 PHPAPI int php_register_internal_extensions(void)
165 {
166 	return php_register_extensions(php_builtin_extensions, EXTCOUNT);
167 }
168