2019-01-28 17:34:31 +08:00
|
|
|
PHP 8.0 INTERNALS UPGRADE NOTES
|
2010-08-30 18:26:31 +08:00
|
|
|
|
|
|
|
1. Internal API changes
|
2019-02-04 18:47:09 +08:00
|
|
|
a. Object Handlers API
|
2019-02-08 02:05:46 +08:00
|
|
|
b. ZEND_OVERLOADED_FUNCTION and corresponding call_method() object handler
|
2019-03-23 15:15:53 +08:00
|
|
|
c. TSRM changes
|
2019-05-29 17:52:55 +08:00
|
|
|
d. get() and set() object handlers
|
2019-06-03 15:39:17 +08:00
|
|
|
e. zend_parse_parameters 'L' specifier
|
2019-06-06 19:05:11 +08:00
|
|
|
f. Arginfo argument types
|
2019-07-24 19:13:40 +08:00
|
|
|
g. zend_free_op type and should_free argument of zend_get_zval_ptr()
|
2019-09-10 20:18:53 +08:00
|
|
|
h. zend_value_error()
|
2019-09-24 22:20:18 +08:00
|
|
|
i. get_closure() object handler
|
2019-10-07 22:57:49 +08:00
|
|
|
j. compare_objects() and compare() object handlers
|
2010-09-17 16:42:12 +08:00
|
|
|
|
2010-11-18 18:43:01 +08:00
|
|
|
2. Build system changes
|
2018-10-03 14:47:07 +08:00
|
|
|
a. Abstract
|
|
|
|
b. Unix build system changes
|
|
|
|
c. Windows build system changes
|
2010-11-18 18:43:01 +08:00
|
|
|
|
2015-07-03 17:46:30 +08:00
|
|
|
3. Module changes
|
2010-11-18 18:43:01 +08:00
|
|
|
|
2010-08-30 18:26:31 +08:00
|
|
|
========================
|
|
|
|
1. Internal API changes
|
|
|
|
========================
|
|
|
|
|
2019-02-08 02:05:46 +08:00
|
|
|
a. Object Handlers API and some related functions, e.g. zend_call_method() and
|
|
|
|
zend_objects_clone_obj() were changed to receive zend_object* instead of
|
|
|
|
zval* and zend_string* instead of zval* for property names.
|
2019-02-04 18:47:09 +08:00
|
|
|
|
2019-02-08 02:05:46 +08:00
|
|
|
b. ZEND_OVERLOADED_FUNCTION and corresponding call_method() object handler
|
|
|
|
were removed. ZEND_INTERNAL_FUNCTION with ZEND_ACC_CALL_VIA_HANDLER and
|
|
|
|
defined "handler" callback should be used instead. This "handler" callback
|
|
|
|
should also take care about function cleanup. See ext/zend_test/test.c
|
|
|
|
for example.
|
2019-06-26 09:15:28 +08:00
|
|
|
|
2019-03-23 15:15:53 +08:00
|
|
|
c. The following things have been removed from TSRM:
|
|
|
|
- TSRMLS_DC
|
|
|
|
- TSRMLS_D
|
|
|
|
- TSRMLS_CC
|
2019-03-25 15:00:57 +08:00
|
|
|
- TSRMLS_C
|
2019-03-23 15:15:53 +08:00
|
|
|
- TSRMLS_FETCH
|
|
|
|
- TSRMLS_FETCH_FROM_CTX
|
|
|
|
- TSRMLS_SET_CTX
|
|
|
|
- tsrm_new_interpreter_context
|
|
|
|
- tsrm_set_interpreter_context
|
|
|
|
- tsrm_free_interpreter_context
|
|
|
|
- support for GNUPTH, SGI ST, and BETHREADS
|
2019-06-26 09:15:28 +08:00
|
|
|
|
2019-05-29 17:52:55 +08:00
|
|
|
d. The get() and set() object handlers have been removed. The get() handler
|
|
|
|
can generally be replaced with cast_object(). Some uses of set() may be
|
|
|
|
replaced by do_operation(). If set() was used to overload direct
|
|
|
|
assignments using "=", then this is no longer supported and the
|
|
|
|
functionality should be provided in some other way (for example, as
|
|
|
|
modification of an object property).
|
2019-05-28 22:55:52 +08:00
|
|
|
|
2019-06-03 15:39:17 +08:00
|
|
|
e. The zend_parse_parameters 'L' specifier and the Z_PARAM_STRICT_LONG()
|
2019-06-03 16:34:32 +08:00
|
|
|
family of macros have been removed. Use 'l' and Z_PARAM_LONG() instead,
|
2019-06-03 15:39:17 +08:00
|
|
|
which, despite the confusing name, actually have stricter input validation.
|
2019-01-07 19:28:51 +08:00
|
|
|
|
2019-06-06 19:05:11 +08:00
|
|
|
f. Arginfo argument types for internal functions are no longer checked.
|
|
|
|
Instead type checks should be performed using the zend_parse_parameters()
|
|
|
|
or ZEND_PARSE_PARAMETERS_*() APIs.
|
|
|
|
|
2019-07-24 19:13:40 +08:00
|
|
|
g. zend_free_op type and "should_free" argument of zend_get_zval_ptr() were
|
|
|
|
removed. It's possible to get the old "should_free" value using the
|
|
|
|
following code.
|
|
|
|
|
|
|
|
zval *ret = zend_get_zval_ptr(opline, opline->op1_type, &opline->op1,
|
|
|
|
execute_data, BP_VAR_R);
|
|
|
|
zval *should_free = (op_type & (IS_TMP_VAR|IS_VAR)) ? ret : NULL;
|
|
|
|
|
2019-09-10 20:18:53 +08:00
|
|
|
h. Added the zend_value_error() function, which is intended to be used
|
|
|
|
to raise ValueError when inappropriate argument values are passed
|
|
|
|
to functions.
|
|
|
|
|
2019-09-24 22:20:18 +08:00
|
|
|
i. get_closure() object handlers now accept an additional zend_bool parameter
|
|
|
|
`check_only`. If it is true, the handler is called to check whether the
|
|
|
|
object is callable; in this case the handler should not throw an exception.
|
|
|
|
|
2019-10-07 22:57:49 +08:00
|
|
|
j. compare_objects() handler was removed. Extensions should use compare() object
|
|
|
|
handler instead and check if both arguments are objects and have the same
|
2019-10-08 03:49:46 +08:00
|
|
|
compare handler, using ZEND_COMPARE_OBJECTS_FALLBACK() macro.
|
2019-10-07 22:57:49 +08:00
|
|
|
|
2010-11-18 18:43:01 +08:00
|
|
|
========================
|
|
|
|
2. Build system changes
|
|
|
|
========================
|
|
|
|
|
2018-10-03 14:47:07 +08:00
|
|
|
a. Abstract
|
2019-06-26 09:15:28 +08:00
|
|
|
- Symbol HAVE_HASH_EXT is removed and is no longer defined. It should be
|
|
|
|
considered to have hash extension always available since PHP 7.4.
|
2019-07-15 05:02:52 +08:00
|
|
|
- Symbol HAVE_PCRE is removed and is no longer defined. It should be
|
|
|
|
considered to have pcre extension always available since PHP 7.4.
|
2019-07-21 06:39:44 +08:00
|
|
|
- Symbol HAVE_LOCALE_H has been removed and is no longer defined.
|
2018-10-03 14:47:07 +08:00
|
|
|
|
|
|
|
b. Unix build system changes
|
2019-06-26 09:15:28 +08:00
|
|
|
|
2019-03-22 17:10:01 +08:00
|
|
|
1. --enable-maintainer-zts is renamed --enable-zts for parity with Windows
|
|
|
|
and as recognition that ZTS is not a "maintainer" or experimental feature.
|
2014-11-10 21:25:14 +08:00
|
|
|
|
2018-10-03 14:47:07 +08:00
|
|
|
c. Windows build system changes
|
2014-11-10 21:25:14 +08:00
|
|
|
|
2015-01-26 05:14:40 +08:00
|
|
|
========================
|
|
|
|
3. Module changes
|
|
|
|
========================
|
2018-09-16 17:07:40 +08:00
|
|
|
|