1PHP 8.4 INTERNALS UPGRADE NOTES 2 31. Internal API changes 4 52. Build system changes 6 73. Module changes 8 94. OpCode changes 10 115. SAPI changes 12 13======================== 141. Internal API changes 15======================== 16 17* zend_register_module_ex() now takes an additional int module_type argument. 18 This function will also assign the module number and type, there is no need 19 to do this at the call site anymore. Writing the handle should happen after 20 successful registration. 21 22* ZPP now accepts a F or Z_PARAM_FUNC_NO_TRAMPOLINE_FREE type check. 23 This is identical to the 'f' or Z_PARAM_FUNC type check, except the FCC is 24 always initialized because it doesn't free trampolines. 25 Trampolines MUST be freed using zend_release_fcall_info_cache() or consumed. 26 Z_PARAM_FUNC_EX2 was added as well with the same arguments as Z_PARAM_FUNC_EX 27 plus an additional argument free_trampoline. 28 29* The zend_object_iterator_funcs valid member has changed its signature from 30 int(*)(zend_object_iterator *) to zend_result(*)(zend_object_iterator *) to 31 be more in line with what callbacks are returning. 32 33* The backwards compatibility headers ext/standard/{php_lcg.h,php_mt_rand.h, 34 php_rand.h,php_random.h} have been removed. Include ext/random/php_random.h 35 directly. 36 37* The zend_*printf family of functions now supports the "%S" modifier to print 38 out zend_string*. This won't cut off the string if it embeds a NUL byte. 39 40======================== 412. Build system changes 42======================== 43 44 a. Abstract 45 - The configure option --with-imap has been removed. 46 - The configure option --with-mhash emits deprecation warning. 47 - The configure option --with-pdo-oci has been removed. 48 - The configure option --with-pspell has been removed. 49 - Symbol SIZEOF_SHORT removed (size of 2 on 32-bit and 64-bit platforms). 50 - Symbol DBA_CDB_MAKE removed in ext/dba. 51 52 b. Unix build system changes 53 - The configure option --with-imap-ssl has been removed. 54 - The configure option --with-oci8 has been removed. 55 - The configure option --with-zlib-dir has been removed. 56 - COOKIE_IO_FUNCTIONS_T symbol has been removed (use cookie_io_functions_t). 57 - HAVE_SOCKADDR_UN_SUN_LEN symbol renamed to HAVE_STRUCT_SOCKADDR_UN_SUN_LEN. 58 - HAVE_UTSNAME_DOMAINNAME symbol renamed to HAVE_STRUCT_UTSNAME_DOMAINNAME. 59 - PHP_CHECK_IN_ADDR_T M4 macro and 'in_addr_t' fallback definition to 'u_int' 60 removed (use AC_CHECK_TYPES Autoconf macro instead). 61 - HAVE_ODBC2 symbol has been removed in ext/odbc. 62 - Removed linking with obsolete dnet_stub library in ext/pdo_dblib. 63 - Removed checking and linking with obsolete libbind for some functions. 64 - Symbol HAVE_JSON has been removed (ext/json is always available since PHP 65 8.0). 66 - Symbol DARWIN has been removed (use __APPLE__ to target Darwin systems). 67 - Symbol MISSING_FCLOSE_DECL and M4 macro PHP_MISSING_FCLOSE_DECL removed. 68 - Symbol HAVE_BSD_ICONV has been removed. 69 - M4 macro PHP_DEFINE (atomic includes) removed (use AC_DEFINE and config.h). 70 71 c. Windows build system changes 72 - The configure options --with-oci8-11g, --with-oci8-12c, --with-oci8-19 have 73 been removed. 74 - Added Bison flag '-Wall' when generating lexer files as done in *nix build 75 system. 76 - HAVE_WIN32_NATIVE_THREAD, USE_WIN32_NATIVE_THREAD, ENABLE_THREADS symbols 77 in ext/mbstring/libmbfl removed. 78 - FIBER_ASSEMBLER and FIBER_ASM_ARCH Makefile variables removed in favor of 79 PHP_ASSEMBLER and FIBER_ASM_ABI. 80 81======================== 823. Module changes 83======================== 84 85 a. ext/dom 86 - dom_read_t and dom_write_t now expect the function to return zend_result 87 instead of int. 88 - The macros DOM_NO_ARGS() and DOM_NOT_IMPLEMENTED() have been removed. 89 - New public APIs are available to handle callbacks from XPath, see 90 xpath_callbacks.h. 91 92 b. ext/random 93 - The macro RAND_RANGE_BADSCALING() has been removed. The implementation 94 should either be inlined and undefined behavior fixed or it should be 95 replaced by a non-biased scaler. 96 - The generate member of a php_random_algo is now expected to return 97 the new php_random_result struct, replacing the last_generated_size 98 member of the php_random_status struct and the generate_size member of 99 the php_random_algo struct. 100 - The CSPRNG API (php_random_(bytes|int)_*) is now provided by the new 101 and much smaller php_random_csprng.h header. The new header is included 102 in php_random.h for compatibility with existing users. 103 104 c. ext/xsl 105 - The function php_xsl_create_object() was removed as it was not used 106 nor exported. 107 108 d. ext/libxml 109 - Added php_libxml_pretend_ctx_error_ex() to emit errors as if they had come 110 from libxml. 111 - Removed the "properties" HashTable field from php_libxml_node_object. 112 113 e. ext/date 114 - Added the php_format_date_ex() API to format instances of php_date_obj. 115 - Added the php_date_initialize_from_ts_long() and 116 php_date_initialize_from_ts_double() to initialize a php_date_obj with 117 the given unix timestamp using GMT +00:00. 118 119 d. ext/pcre 120 - php_pcre_match_impl() now no longer has a use_flags argument. 121 When flags should be ignored, pass 0 to the flags argument. 122 - php_pcre_match_impl() and pcre_get_compiled_regex_cache_ex() now use 123 proper boolean argument types instead of integer types. 124 125======================== 1264. OpCode changes 127======================== 128 129* New FRAMELESS_ICALL_[0,3] opcodes for faster internal function calls have been 130 added. These opcodes don't create a stack frame, but pass arguments via opcode 131 operands. They only work for functions that are known at compile-time, and 132 that provide a frameless handler (search for usages of the 133 ZEND_FRAMELESS_FUNCTION macro). 134 135======================== 1365. SAPI changes 137======================== 138