Skip to content

Stdlib: fpow()/fmin()/fmax()/nextafter() — callable on PHP_COMPILER_PROFILE=8.4 but function_exists false (BuiltinIntrospectionPolicy, ext/standard/math.c) #16677

Description

@PurHur

Category

stdlib · php-src-strict · introspection parity

Problem

On PHP_COMPILER_PROFILE=8.4, IEEE math builtins are registered for direct calls but withheld from function_exists() until CompilerVersion::VERSION reaches stable 8.4.0. Zend 8.4 advertises these functions when the language profile supports them; code using function_exists('fpow') before calling breaks.

Call / probe Zend 8.4+ (forward) VM PHP_COMPILER_PROFILE=8.4 (2026-07-05)
fpow(2, 3) 8 8 (callable)
function_exists('fpow') true false
function_exists('nextafter') true false

Same pattern for fmin() / fmax().

php-src reference

PHP implementation target

Repro

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && PHP_COMPILER_PROFILE=8.4 php bin/vm.php test/repro/maintainer_gap_fpow_function_exists_forward_84.php'
PHP_COMPILER_PROFILE=8.4 php bin/vm.php test/repro/maintainer_gap_fpow_function_exists_forward_84.php

Done when

  • Repro prints ok: fpow advertised (and siblings) on forward profile
  • Reference profile (no env) still reports function_exists('fpow') === false like Zend 8.2
  • Compliance guard under test/compliance/cases/stdlib/
  • php-src-strict; no php-compiler-strict shortcut

Related

Activity

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