Skip to content

Regression: class_has_method/property/constant() not registered on 8.4.0-dev — supportsClassHasFunctions version_compare gate (re-#9989) #15025

Closed

Description

@PurHur

Repro

php bin/vm.php test/repro/maintainer_gap_class_has_functions_unregistered.php

Expected: ok (PHP 8.4 builtins on forward 8.4.0-dev profile)

Actual: fail: function_exists(class_has_method) false on 8.4.0-dev

Root cause

Implementations exist in ext/standard/class_has_method_.php, class_has_property_.php, class_has_constant_.php, but ext/standard/Module.php gates registration on CompilerVersion::supportsClassHasFunctions() which uses raw version_compare(self::VERSION, '8.4.0', '>='). PHP treats 8.4.0-dev as below stable 8.4.0, so nothing registers despite PHP_VERSION=8.4.0-dev.

Use advertisesBuiltinSince('8.4.0') (see CompilerVersion::builtinAdvertisementVersion()) like other forward-profile gates (#14518).

php-src reference

  • ext/standard/basic_functions.c — PHP_FUNCTION(class_has_method), class_has_property, class_has_constant

Done when

  • function_exists('class_has_method'|'class_has_property'|'class_has_constant') true on 8.4.0-dev forward profile
  • test/compliance/cases/stdlib/class_has_method.phpt green via bin/vm.php
  • test/repro/maintainer_gap_class_has_functions_unregistered.php prints ok
  • php-src-strict: still false on PHP 8.2 reference profile (phantom gate unchanged)

Activity

  1. added
    enhancementNew feature or request
    phase-4:stdlibPhase 4 – stdlib for web apps
    area:vmVirtual machine
    implementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claim
    on Jul 2, 2026
  2. PurHur commented on Jul 2, 2026

    @PurHur
    OwnerAuthor

    claim: PHP Compiler STD Lib — batch (issues #15025 #15026 #15027 #15028)

  3. PurHur commented on Jul 2, 2026

    @PurHur
    OwnerAuthor

    Merged in #15031. VM repro + AOT lint green on forward profile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:vmVirtual machineenhancementNew feature or requestimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimphase-4:stdlibPhase 4 – stdlib for web appsstdlib

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions