The documentation at https://developer.wordpress.org appears to have been broken and out of date since a commit on August 1, 2023 was introduced.
The docs-generation process should be able to proceed on wordpress/wordpress-develop on the trunk branch. It need not run on the latest version of PHP, it need not solve every existing problem, but it must unfreeze the stale docs.
Before the process was entirely broken it found the wrong code snippets widely. This has been reported in numerous other issues. A fix needs to find the proper code spans.