| 
1 | 1 | # PHP build system evolution  | 
2 | 2 | 
 
  | 
 | 3 | +This document describes how the PHP build system evolved through time.  | 
 | 4 | + | 
3 | 5 | ## PHP 1 (1995)  | 
4 | 6 | 
 
  | 
5 | 7 | First public release of PHP 1 - Personal Home Page Tools started with a single  | 
@@ -147,6 +149,180 @@ improved one step forward with cache variables synced enabling the manual  | 
147 | 149 | overrides on many places. C preprocessor macros inconsistencies between Windows  | 
148 | 150 | and Autotools configuration headers were synced to a nearly identical behavior.  | 
149 | 151 | 
 
  | 
 | 152 | +<details>  | 
 | 153 | +<summary>PHP 8.4 build system changes</summary>  | 
 | 154 | + | 
 | 155 | +### PHP 8.4 build system changes  | 
 | 156 | + | 
 | 157 | +#### Abstract  | 
 | 158 | + | 
 | 159 | +* The configure options `--with-imap`, `--with-pdo-oci`, and `--with-pspell`  | 
 | 160 | +  have been removed.  | 
 | 161 | +* The configure option `--with-mhash` emits deprecation warning.  | 
 | 162 | +* New configure option `--with-openssl-legacy-provider` to enable OpenSSL legacy  | 
 | 163 | +  provider.  | 
 | 164 | +* New configure option `--with-openssl-argon2` to enable `PASSWORD_ARGON2` from  | 
 | 165 | +  OpenSSL 3.2.  | 
 | 166 | +* Symbol `SIZEOF_SHORT` removed (size of 2 on 32-bit and 64-bit platforms).  | 
 | 167 | +* Symbol `DBA_CDB_MAKE` removed in ext/dba.  | 
 | 168 | +* Symbols `HAVE_LIBM`, `HAVE_INET_ATON`, `HAVE_SIGSETJMP` have been removed.  | 
 | 169 | + | 
 | 170 | +#### Autotools  | 
 | 171 | + | 
 | 172 | +* The configure options `--with-imap-ssl`, `--with-oci8`, `--with-zlib-dir`, and  | 
 | 173 | +  `--with-kerberos` have been removed.  | 
 | 174 | +* The configure option `--with-openssl-dir` has been removed. SSL support in  | 
 | 175 | +  ext/ftp and ext/mysqlnd is enabled implicitly, when building with ext/openssl  | 
 | 176 | +  (`--with-openssl`), or explicitly by using new configure options  | 
 | 177 | +  `--with-ftp-ssl` and `--with-mysqlnd-ssl`.  | 
 | 178 | +* Added php-config `--lib-dir` and `--lib-embed` options for PHP embed SAPI.  | 
 | 179 | +* `COOKIE_IO_FUNCTIONS_T` symbol has been removed in favor of  | 
 | 180 | +  `cookie_io_functions_t`.  | 
 | 181 | +* `HAVE_SOCKADDR_UN_SUN_LEN` symbol renamed to `HAVE_STRUCT_SOCKADDR_UN_SUN_LEN`.  | 
 | 182 | +* `HAVE_UTSNAME_DOMAINNAME` symbol renamed to `HAVE_STRUCT_UTSNAME_DOMAINNAME`.  | 
 | 183 | +* `PHP_CHECK_IN_ADDR_T` Autoconf macro and `in_addr_t` fallback definition to  | 
 | 184 | +  `u_int` removed in favor of `AC_CHECK_TYPES` Autoconf macro.  | 
 | 185 | +* `HAVE_ODBC2` symbol has been removed in ext/odbc.  | 
 | 186 | +* Symbol `HAVE_JSON` has been removed (ext/json is always available since PHP  | 
 | 187 | +  8.0).  | 
 | 188 | +* Symbol `DARWIN` has been removed in favor of `__APPLE__` to target Darwin  | 
 | 189 | +  systems.  | 
 | 190 | +* Symbol `MISSING_FCLOSE_DECL` and Autoconf macro `PHP_MISSING_FCLOSE_DECL` were  | 
 | 191 | +  removed.  | 
 | 192 | +* Symbol `HAVE_BSD_ICONV` has been removed.  | 
 | 193 | +* Symbol `ZEND_FIBER_ASM` has been removed.  | 
 | 194 | +* Symbols `HAVE_DLOPEN` and `HAVE_DLSYM` have been removed.  | 
 | 195 | +* Symbol `HAVE_MYSQL` has been removed.  | 
 | 196 | +* Symbol `HAVE_PDO_SQLITELIB` has been removed.  | 
 | 197 | +* Symbol `HAVE_WAITPID` has been removed.  | 
 | 198 | +* Symbol `HAVE_LIBPQ` has been removed.  | 
 | 199 | +* Symbols `HAVE_LIBRT` and `HAVE_TIMER_CREATE` removed.  | 
 | 200 | +* Symbols `PHP_FPM_SYSTEMD`, `PHP_FPM_USER`, and `PHP_FPM_GROUP` removed.  | 
 | 201 | +* Symbol `PTHREADS` has been removed.  | 
 | 202 | +* Symbol `HAVE_STRPTIME_DECL_FAILS` has been removed in favor of  | 
 | 203 | +  `HAVE_DECL_STRPTIME`.  | 
 | 204 | +* Symbol `HAVE_PHPDBG` has been removed.  | 
 | 205 | +* Symbols `PHP_HAVE_AVX512_SUPPORTS` and `PHP_HAVE_AVX512_VBMI_SUPPORTS` are now  | 
 | 206 | +  either defined to 1 or undefined.  | 
 | 207 | +* Symbol `HAVE_LIBCRYPT` has been removed.  | 
 | 208 | +* Autoconf macro `PHP_DEFINE` (atomic includes) removed in favor of `AC_DEFINE`  | 
 | 209 | +  and extensions's config.h.  | 
 | 210 | +* Autoconf macro `PHP_WITH_SHARED` has been removed in favor of `PHP_ARG_WITH`.  | 
 | 211 | +* Autoconf macro `PHP_STRUCT_FLOCK` has been removed in favor of  | 
 | 212 | +  `AC_CHECK_TYPES`.  | 
 | 213 | +* Autoconf macro `PHP_SOCKADDR_CHECKS` has been removed in favor of  | 
 | 214 | +  `AC_CHECK_TYPES` and `AC_CHECK_MEMBERS`.  | 
 | 215 | +* Autoconf macro `PHP_CHECK_GCC_ARG` has been removed since PHP 8.0 in favor  | 
 | 216 | +  of `AX_CHECK_COMPILE_FLAG`.  | 
 | 217 | +* Autoconf macro `PHP_PROG_RE2C` got a new 2nd argument to define common  | 
 | 218 | +  default re2c command-line options substituted to the Makefile `RE2C_FLAGS`  | 
 | 219 | +  variable.  | 
 | 220 | +* Autoconf macros `PHP_CHECK_BUILTIN_*` have been removed in favor of  | 
 | 221 | +  `PHP_CHECK_BUILTIN` and all `PHP_HAVE_BUILTIN_*` symbols changed to be either  | 
 | 222 | +  undefined or defined to 1 whether compiler supports the builtin.  | 
 | 223 | +* Autoconf macro `PHP_SETUP_OPENSSL` doesn't accept the 3rd argument anymore.  | 
 | 224 | +* Autoconf macro `PHP_EVAL_LIBLINE` got a new 3rd argument to override the  | 
 | 225 | +  ext_shared checks.  | 
 | 226 | +* Autoconf macro `PHP_SETUP_LIBXML` doesn't define the redundant `HAVE_LIBXML`  | 
 | 227 | +  symbol anymore and requires at least libxml2 2.9.4.  | 
 | 228 | +* Autoconf macro `PHP_SETUP_ICONV` doesn't define the `HAVE_ICONV` symbol  | 
 | 229 | +  anymore.  | 
 | 230 | +* Autoconf macro `PHP_AP_EXTRACT_VERSION` is obsolete in favor of the  | 
 | 231 | +  `apxs -q HTTPD_VERSION`.  | 
 | 232 | +* Autoconf macro `PHP_OUTPUT` is obsolete in favor of `AC_CONFIG_FILES`.  | 
 | 233 | +* Autoconf macro `PHP_TEST_BUILD` is obsolete in favor of `AC_*` macros.  | 
 | 234 | +* Autoconf macro `PHP_BUILD_THREAD_SAFE` is obsolete in favor of setting the  | 
 | 235 | +  enable_zts variable manually.  | 
 | 236 | +* Autoconf macro `PHP_DEF_HAVE` is obsolete in favor of `AC_DEFINE`.  | 
 | 237 | +* Autoconf macro `PHP_PROG_SETUP` now accepts an argument to set the minimum  | 
 | 238 | +  required PHP version during the build.  | 
 | 239 | +* Autoconf macro `PHP_INSTALL_HEADERS` arguments can now be also  | 
 | 240 | +  blank-or-newline-separated lists instead of only separated with whitespace or  | 
 | 241 | +  backslash-then-newline.  | 
 | 242 | +* Autoconf macro `PHP_ADD_BUILD_DIR` now also accepts 1st argument as a  | 
 | 243 | +  blank-or-newline-separated separated list.  | 
 | 244 | +* Autoconf macros `PHP_NEW_EXTENSION`, `PHP_ADD_SOURCES`, `PHP_ADD_SOURCES_X`,  | 
 | 245 | +  `PHP_SELECT_SAPI` now have the source files and flags arguments normalized  | 
 | 246 | +  so the list of items can be passed as a blank-or-newline-separated list.  | 
 | 247 | +* Autoconf macro `PHP_ADD_INCLUDE` now takes also a blank-or-newline-separated  | 
 | 248 | +  list of include directories instead of a single directory. The "prepend"  | 
 | 249 | +  argument is validated at Autoconf compile time.  | 
 | 250 | +* TSRM/tsrm.m4 file and its `TSRM_CHECK_PTHREADS` macro have been removed.  | 
 | 251 | +* Added pkg-config support to find libpq for the pdo_pgsql and pgsql  | 
 | 252 | +  extensions. The libpq paths can be customized with the `PGSQL_CFLAGS` and  | 
 | 253 | +  PGSQL_LIBS environment variables. When a directory argument is provided to  | 
 | 254 | +  configure options (`--with-pgsql=DIR` or `--with-pdo-pgsql=DIR`), it will  | 
 | 255 | +  be used instead of the pkg-config search.  | 
 | 256 | +* Added pkg-config support to find unixODBC and iODBC for the pdo_odbc  | 
 | 257 | +  extension.  | 
 | 258 | +* Added pkg-config support to find GNU MP library. As a fallback default  | 
 | 259 | +  system paths are searched. When a directory argument is provided  | 
 | 260 | +  (`--with-gmp=DIR`), it will be used instead of the pkg-config.  | 
 | 261 | +* Added optional pkg-config support to find NET-SNMP library. As a fallback  | 
 | 262 | +  net-snmp-config utility is used like before.  | 
 | 263 | +* Cache variables synced to php_cv_\* naming scheme. When used for  | 
 | 264 | +  advanced cross-compilation, these were renamed:  | 
 | 265 | +  * ac_cv_copy_file_range             -> php_cv_func_copy_file_range  | 
 | 266 | +  * ac_cv_flush_io                    -> php_cv_have_flush_io  | 
 | 267 | +  * ac_cv_func_getaddrinfo            -> php_cv_func_getaddrinfo  | 
 | 268 | +  * ac_cv_have_broken_gcc_strlen_opt  -> php_cv_have_broken_gcc_strlen_opt  | 
 | 269 | +  * ac_cv_have_pcre2_jit              -> php_cv_have_pcre2_jit  | 
 | 270 | +  * ac_cv_pread                       -> php_cv_func_pread  | 
 | 271 | +  * ac_cv_pwrite                      -> php_cv_func_pwrite  | 
 | 272 | +  * ac_cv_syscall_shadow_stack_exists -> php_cv_have_shadow_stack_syscall  | 
 | 273 | +  * ac_cv_time_r_type                 -> php_cv_time_r_type  | 
 | 274 | +  * ac_cv_write_stdout                -> php_cv_have_write_stdout  | 
 | 275 | +  and all other checks wrapped with their belonging cache variables.  | 
 | 276 | +* Backticks command substitutions in Autoconf code have been replaced with  | 
 | 277 | +  `$(...)`. Passing double escaped Makefile variables `\\$(VAR)` to some  | 
 | 278 | +  Autoconf macros should be now done with `\$(VAR)` or by using regular shell  | 
 | 279 | +  variables.  | 
 | 280 | +* Removed linking with obsolete dnet_stub library in ext/pdo_dblib.  | 
 | 281 | +* Removed checking and linking with obsolete libbind for some functions.  | 
 | 282 | +
  | 
 | 283 | +#### Windows  | 
 | 284 | +
  | 
 | 285 | +* The configure options `--with-oci8-11g`, `--with-oci8-12c`,  | 
 | 286 | +  `--with-oci8-19`, and `--enable-apache2-2handler` have been removed.  | 
 | 287 | +* The configure option `--enable-apache2-4handler` became an alias for the  | 
 | 288 | +  preferred `--enable-apache2handler`.  | 
 | 289 | +* Added new configure option `--enable-phpdbg-debug` to build phpdbg in  | 
 | 290 | +  debug mode.  | 
 | 291 | +* Added support for native AVX-512 builds with  | 
 | 292 | +  `--enable-native-intrinsics=avx512` configure option.  | 
 | 293 | +* Building with Visual Studio requires at least Visual Studio 2019.  | 
 | 294 | +* Added Bison flag `-Wall` when generating lexer files as done in \*nix  | 
 | 295 | +  build system.  | 
 | 296 | +* `HAVE_WIN32_NATIVE_THREAD`, `USE_WIN32_NATIVE_THREAD`, `ENABLE_THREADS`  | 
 | 297 | +  symbols in ext/mbstring/libmbfl removed.  | 
 | 298 | +* `FIBER_ASSEMBLER` and `FIBER_ASM_ARCH` Makefile variables removed in favor of  | 
 | 299 | +  `PHP_ASSEMBLER` and `FIBER_ASM_ABI`.  | 
 | 300 | +* `HAVE_PHP_SOAP` symbol renamed to `HAVE_SOAP`.  | 
 | 301 | +* Unused symbols `CONFIGURATION_FILE_PATH`, `DISCARD_PATH`, `HAVE_ERRMSG_H`,  | 
 | 302 | +  `HAVE_REGCOMP`, `HAVE_RINT`, `NEED_ISBLANK`, `PHP_URL_FOPEN`, `REGEX`,  | 
 | 303 | +  `HSREGEX`, and `USE_CONFIG_FILE` have been removed.  | 
 | 304 | +* The `HAVE_OPENSSL` symbol has been removed.  | 
 | 305 | +* The `HAVE_OPENSSL_EXT` symbol consistently defined to value 1 whether the  | 
 | 306 | +  openssl extension is available either as shared or built statically.  | 
 | 307 | +* The `win32/build/libs_version.txt` file has been removed.  | 
 | 308 | +* MSVC builds use the new preprocessor (`/Zc:preprocessor`).  | 
 | 309 | +* The `CHECK_HEADER_ADD_INCLUDE` function consistently defines preprocessor  | 
 | 310 | +  macros `HAVE_<header>_H` either to value 1 or leaves them undefined to  | 
 | 311 | +  match the Autotools headers checks.  | 
 | 312 | +
  | 
 | 313 | +</details>  | 
 | 314 | +
  | 
150 | 315 | ## PHP 8.5 (2025)  | 
151 | 316 | 
  | 
152 | 317 | PHP coding standards now use the C11 standard.  | 
 | 318 | +
  | 
 | 319 | +<details>  | 
 | 320 | +<summary>PHP 8.5 changelog</summary>  | 
 | 321 | +
  | 
 | 322 | +### PHP 8.5 changelog  | 
 | 323 | +
  | 
 | 324 | +#### Abstract  | 
 | 325 | +
  | 
 | 326 | +* ext/phar/php_phar.h is not installed anymore  | 
 | 327 | +
  | 
 | 328 | +</details>  | 
0 commit comments