forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUPGRADING.INTERNALS
94 lines (77 loc) · 3.49 KB
/
UPGRADING.INTERNALS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
PHP 8.3 INTERNALS UPGRADE NOTES
1. Internal API changes
2. Build system changes
3. Module changes
4. OpCode changes
5. SAPI changes
========================
1. Internal API changes
========================
* zend_class_entry now possesses a default_object_handlers field, which
provides a default object handler when create_object() is not overriding it.
* Custom Fiber implementations have to initialize EG(stack_limit) and
EG(stack_base).
* EG(opline_before_exception) may now be null if the VM throws an exception
before executing any opline.
* Many C header files have been cleaned up and include dependencies
have been reduced. Many headers which used to be always included by
Zend headers (e.g. "errno.h") are no longer implied, and this may
break the build of third-party extensions which relied on this
implementation detail. Those extensions may need to add the missing
#include lines.
* Since version 8, PHP requires a C99 compiler. Configure-time checks
for C99 features have been removed and therefore macro definitions
from php_config.h have disappeared. Do not use those feature
macros.
* Internal class aliases created during request time can now exist in
the class table. zend_register_class_alias_ex() will not increase
the refcount for class aliases and the cleanup function takes this
into account.
* The return types of the following functions have been changed from
`bool` to `zend_result`:
- zend_fiber_init_context()
========================
2. Build system changes
========================
* Removed the HAVE_DEV_URANDOM compile time check. HAVE_DEV_URANDOM will
now never be defined. Any checks relying on HAVE_DEV_URANDOM should be
removed. Even with HAVE_DEV_URANDOM it was not guaranteed that
/dev/urandom is actually available at run time and thus a runtime
check needs to happen in all cases.
========================
3. Module changes
========================
a. ext/json
- A new function php_json_validate_ex has been added to check if the
provided C string is valid for the given depth and options.
b. ext/standard
- The PHPAPI php_url_encode_hash_ex() function has had its signature change
from:
PHPAPI void php_url_encode_hash_ex(HashTable *ht, smart_str *formstr,
const char *num_prefix, size_t num_prefix_len,
const char *key_prefix, size_t key_prefix_len,
const char *key_suffix, size_t key_suffix_len,
zval *type, const char *arg_sep, int enc_type);
to:
PHPAPI void php_url_encode_hash_ex(HashTable *ht, smart_str *formstr,
const char *num_prefix, size_t num_prefix_len,
const zend_string *key_prefix,
zval *type, const zend_string *arg_sep, int enc_type);
The change to use zend_string prevent the computation of the arg_sep
length at each call. The key_suffix parameter was dropped as it was a
constant value and depended on the key_prefix parameter to not be NULL.
c. ext/mysqlnd
- The function mysqlnd_shutdown and its corresponding internal methods
mysqlnd_command::shutdown & mysqlnd_conn_data::shutdown have been removed.
These functions are deprecated by MySQL in favour of SHUTDOWN SQL statement.
d. ext/pcre
- The function pcre_get_compiled_regex_ex has been removed.
Use pcre_get_compiled_regex instead.
========================
4. OpCode changes
========================
========================
5. SAPI changes
========================
* SAPIs that may execute in alternative stacks have to set EG(stack_limit) and
EG(stack_base)