@@ -121,21 +121,23 @@ PHP 8.3 INTERNALS UPGRADE NOTES
121
121
properties in a read-only way. This function avoids allocation when there are
122
122
no document properties changed yet.
123
123
- The node list returned by DOMNode::getElementsByTagName() and
124
- DOMNode::getElementsByTagNameNS() now caches the length and the last requested item.
125
- This means that the length and the last requested item are not recalculated
126
- when the node list is iterated over multiple times.
127
- If you do not use the internal PHP dom APIs to modify the document, you need to
128
- manually invalidate the cache using php_libxml_invalidate_node_list_cache_from_doc().
129
- Furthermore, the following internal APIs were added to handle the cache:
130
- . php_dom_is_cache_tag_stale_from_doc_ptr()
131
- . php_dom_is_cache_tag_stale_from_node()
132
- . php_dom_mark_cache_tag_up_to_date_from_node()
124
+ DOMNode::getElementsByTagNameNS() now caches the length and the last requested item.
125
+ This means that the length and the last requested item are not recalculated
126
+ when the node list is iterated over multiple times.
127
+ If you do not use the internal PHP dom APIs to modify the document, you need to
128
+ manually invalidate the cache using php_libxml_invalidate_node_list_cache_from_doc().
129
+ Furthermore, the following internal APIs were added to handle the cache:
130
+ . php_dom_is_cache_tag_stale_from_doc_ptr()
131
+ . php_dom_is_cache_tag_stale_from_node()
132
+ . php_dom_mark_cache_tag_up_to_date_from_node()
133
133
- The function dom_get_elements_by_tag_name_ns_raw() has an additional parameter to indicate
134
134
the base node of the node list. This function also no longer accepts -1 as the index argument.
135
135
- The function dom_namednode_iter() has additional arguments to avoid recomputing the length of
136
136
the strings.
137
137
- The functions dom_parent_node_prepend(), dom_parent_node_append(), dom_parent_node_after(), and
138
138
dom_parent_node_before() now use an uint32_t argument for the number of nodes instead of int.
139
+ - There is now a helper function php_dom_get_content_into_zval() to get the contents of a node.
140
+ This avoids allocation if possible.
139
141
140
142
g. ext/libxml
141
143
- Two new functions: php_libxml_invalidate_node_list_cache_from_doc() and
0 commit comments