php / php/php-src

DOM extension reflection version is incorrect

Open
#8,038 6 comments 0 reactions 0 assignees View on GitHub

@cmb69 is already working on this.

Since Feb 4, 2025.

Bug Extension: dom Status: Verified
Dominant language
C
Stars
40.4k
Forks
8.1k
Avg merge
2d 13h
Merged PRs (30d)
96

Description

Description

Getting the DOM extension version from the reflection API results in "20031129" no matter which PHP version is used: https://3v4l.org/VIJKY
I would expect it to behave like other bundled extensions and track the PHP version: https://3v4l.org/iNi1B

The following code:

<?php

$domExtReflection = new ReflectionExtension("dom");
var_dump($domExtReflection->getVersion());

Resulted in this output:

string(8) "20031129"

But I expected this output instead:

string(5) "8.1.2"
PHP Version

8.1.2

Operating System

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the behavior with ReflectionExtension("dom") and getVersion(), then inspect open pull request #17702 for the current work. Compare the DOM extension result with the expected PHP version and verify the issue's reported output is corrected.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, php
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.