Skip to content

Commit fa7af00

Browse files
author
Greg Bowler
committed
docs: mention php 8.4 HTMLDocument
1 parent 2de9031 commit fa7af00

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Diff for: README.md

+8
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,14 @@ This repository aims to be as accurate as possible to the DOM specification at h
9696

9797
This repository is intended to be as accurate to the DOM specification as possible. An extension to the repository is available at https://php.gt/domtemplate which adds page templating and data binding through custom elements and template attributes, introducing serverside functionality like that of WebComponents.
9898

99+
## PHP 8.4 native HTMLDocument
100+
101+
Since PHP 8.4's release, there has been a new native HTMLDocument class shipped in PHP natively. With this having native bindings, all operations are much faster. Work has been started to make PHPGT's Dom implementation utilise the new native code. Luckily, the DOM is a very well defined standard so whatever happens, minimal or no changes will be required to your code.
102+
103+
Take a look at the benchmarks on the php84-benchmark branch for yourself: most operations are recorded to have a 90% or higher increase in speed by switching to the native implementation!
104+
105+
More information will be laid out in the readme when more work has been taken towards an implementation of the native classes.
106+
99107
[mdn-HTMLDocument]: https://developer.mozilla.org/docs/Web/API/HTMLDocument
100108
[mdn-Element]: https://developer.mozilla.org/docs/Web/API/Element
101109
[mdn-HTMLCollection]: https://developer.mozilla.org/docs/Web/API/HTMLCollection

0 commit comments

Comments
 (0)