2021-09-01 01:13:49 +08:00
|
|
|
PHP 8.2 INTERNALS UPGRADE NOTES
|
2010-08-30 18:26:31 +08:00
|
|
|
|
|
|
|
1. Internal API changes
|
2010-09-17 16:42:12 +08:00
|
|
|
|
2010-11-18 18:43:01 +08:00
|
|
|
2. Build system changes
|
|
|
|
|
2015-07-03 17:46:30 +08:00
|
|
|
3. Module changes
|
2010-11-18 18:43:01 +08:00
|
|
|
|
2021-12-10 01:15:59 +08:00
|
|
|
4. OpCode changes
|
|
|
|
|
2022-06-08 20:23:41 +08:00
|
|
|
5. SAPI changes
|
|
|
|
|
2010-08-30 18:26:31 +08:00
|
|
|
========================
|
|
|
|
1. Internal API changes
|
|
|
|
========================
|
|
|
|
|
2021-09-24 15:38:08 +08:00
|
|
|
* Removed zend_binary_zval_str(n)casecmp() APIs. These were thin wrappers
|
|
|
|
around zend_binary_str(n)casecmp_l() -- rather than
|
|
|
|
zend_binary_str(n)casecmp() as one would expect. Call the appropriate
|
|
|
|
wrapped function directly instead.
|
2021-10-22 05:54:41 +08:00
|
|
|
* Removed the (ZEND_)WRONG_PARAM_COUNT_WITH_RETVAL() macros.
|
2021-12-29 19:51:18 +08:00
|
|
|
* php_stristr() no longer lowercases the haystack and needle as a side effect.
|
|
|
|
Call zend_str_tolower() yourself if necessary. You no longer need to copy
|
|
|
|
the haystack and needle before passing them to php_stristr().
|
2022-05-24 23:13:38 +08:00
|
|
|
* zend_register_module_ex() no longer copies the module entry.
|
2022-05-29 18:20:56 +08:00
|
|
|
* The main/php_stdint.h header has been removed.
|
|
|
|
Include the standard <inttypes.h> and/or <stdint.h> headers instead.
|
|
|
|
Replace usage of u_char by the standard C99 uint8_t type.
|
2022-06-08 20:23:41 +08:00
|
|
|
* A new ZEND_THREEWAY_COMPARE() macro has been introduced which does a
|
|
|
|
three-way comparison of two integers and returns -1, 0 or 1 if the LHS is
|
|
|
|
smaller, equal or larger than the RHS
|
2022-06-17 20:12:53 +08:00
|
|
|
* Deprecated zend_atoi() and zend_atol(). Use ZEND_STRTOL() for general purpose
|
|
|
|
string to long conversion, or a variant of zend_ini_parse_quantity() for
|
|
|
|
parsing ini quantities.
|
2022-06-26 07:00:19 +08:00
|
|
|
* The return types of the following object handlers has changed from int to zend_result
|
|
|
|
- zend_object_cast_t
|
|
|
|
- zend_object_count_elements_t
|
|
|
|
- zend_object_get_closure_t
|
|
|
|
- zend_object_do_operation_t
|
2022-04-29 11:22:53 +08:00
|
|
|
* Added a new zero_position argument to php_stream_fopen_from_fd_rel to reflect
|
|
|
|
if this a newly created file so the current file offset needs not to be checked.
|
2022-07-08 20:47:46 +08:00
|
|
|
* Added smart_str_trim_to_size(). The function trims the memory allocated for the
|
|
|
|
string. This can considerably reduce the memory footprint of strings smaller
|
|
|
|
than approximately 4096 bytes.
|
|
|
|
* smart_str_extract() and the spprintf family of functions now use
|
|
|
|
smart_str_trim_to_size() before returning the string.
|
|
|
|
* It is recommended to use smart_str_extract() or smart_str_trim_to_size() when
|
|
|
|
using the smart_str API.
|
2022-06-09 01:16:22 +08:00
|
|
|
* zend_is_callable_ex, and functions which call it such as zend_is_callable and
|
|
|
|
zend_fcall_info_init, will issue deprecation notices if passed values which
|
|
|
|
are deprecated (see main UPGRADING notes). To suppress the notice, e.g. to
|
|
|
|
avoid duplicates when processing the same value multiple times, pass or add
|
|
|
|
IS_CALLABLE_SUPPRESS_DEPRECATIONS to the check_flags parameter.
|
2022-07-20 21:50:12 +08:00
|
|
|
* Registered zend_observer_fcall_init handlers are now also called for internal functions.
|
2021-09-24 15:38:08 +08:00
|
|
|
|
2010-11-18 18:43:01 +08:00
|
|
|
========================
|
|
|
|
2. Build system changes
|
|
|
|
========================
|
2021-09-01 01:13:49 +08:00
|
|
|
|
2015-01-26 05:14:40 +08:00
|
|
|
========================
|
|
|
|
3. Module changes
|
|
|
|
========================
|
2020-12-13 23:50:22 +08:00
|
|
|
|
2022-03-13 23:15:57 +08:00
|
|
|
a. ext/standard
|
|
|
|
- The PHP APIs string_natural_compare_function_ex(),
|
|
|
|
string_natural_case_compare_function(), and string_natural_compare_function()
|
|
|
|
have been removed. They always returned SUCCESS and were a wrapper around
|
|
|
|
strnatcmp_ex(). Use strnatcmp_ex() directly instead.
|
2022-07-08 20:32:01 +08:00
|
|
|
- The PHP API php_fgetcsv() now returns a HashTable* instead of having an in-out
|
|
|
|
zval parameter.
|
|
|
|
It now returns NULL on an empty line instead of [null].
|
|
|
|
A new function php_bc_fgetcsv_empty_line() has been added to get a HashTable* which
|
|
|
|
represents [null].
|
2022-05-18 22:30:59 +08:00
|
|
|
b. ext/pdo
|
|
|
|
- pdo_raise_impl_error()'s parameter sqlstate has been changed from
|
|
|
|
const char * to pdo_error_type (aka char [6]).
|
2022-03-13 23:15:57 +08:00
|
|
|
|
2021-12-10 01:15:59 +08:00
|
|
|
========================
|
|
|
|
4. OpCode changes
|
|
|
|
========================
|
|
|
|
|
|
|
|
* The ZEND_INIT_FCALL opcode now asserts that the function exists in the symbol
|
|
|
|
table as the function's existence is checked at compile time.
|
|
|
|
For extensions modifying the function symbol table, setting
|
|
|
|
CG(compiler_options) |= ZEND_COMPILE_IGNORE_USER_FUNCTIONS | ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS;
|
|
|
|
will produce ZEND_INIT_FCALL_BY_NAME opcodes instead which check for the
|
|
|
|
existence of the function at runtime.
|
|
|
|
|
2022-06-08 20:23:41 +08:00
|
|
|
========================
|
|
|
|
5. SAPI changes
|
|
|
|
========================
|
|
|
|
|
|
|
|
* The signature of php_module_startup() has changed from
|
|
|
|
int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_modules, uint32_t num_additional_modules)
|
|
|
|
to
|
|
|
|
zend_result php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_module)
|
|
|
|
as only one additional module was ever provided.
|