Skip to content

Commit b4917d8

Browse files
committed
[ci skip] Update UPGRADING.INTERNALS
1 parent 941a7e5 commit b4917d8

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

UPGRADING.INTERNALS

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -121,21 +121,23 @@ PHP 8.3 INTERNALS UPGRADE NOTES
121121
properties in a read-only way. This function avoids allocation when there are
122122
no document properties changed yet.
123123
- 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()
133133
- The function dom_get_elements_by_tag_name_ns_raw() has an additional parameter to indicate
134134
the base node of the node list. This function also no longer accepts -1 as the index argument.
135135
- The function dom_namednode_iter() has additional arguments to avoid recomputing the length of
136136
the strings.
137137
- The functions dom_parent_node_prepend(), dom_parent_node_append(), dom_parent_node_after(), and
138138
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.
139141

140142
g. ext/libxml
141143
- Two new functions: php_libxml_invalidate_node_list_cache_from_doc() and

0 commit comments

Comments
 (0)