Skip to content

Stdlib: json_validate() missing on PHP_COMPILER_PROFILE=8.4 (ext/json/php_json.c) #17679

Closed

Description

@PurHur

Category

stdlib · PHP 8.4 forward profile · php-src-strict

Problem

json_validate() (PHP 8.3+) must be registered when PHP_COMPILER_PROFILE=8.4 and must not appear on the 8.2 reference profile. VM today: function_exists('json_validate') is false under forward profile.

Repro Zend 8.3+ VM (2026-07-10)
function_exists('json_validate') with PHP_COMPILER_PROFILE=8.4 true false

php-src reference

PHP implementation target

  • ext/json/json_validate.php — delegate to existing JSON parser / VmJson validator
  • ext/json/Module.php — register under forward profile gate
  • lib/CompilerVersion.php / BuiltinIntrospectionPolicy — advertisement parity
  • JIT/AOT: lib/JIT/Builtin/ if separate lowering needed

Repro

test/repro/maintainer_gap_json_validate_reference_profile.php

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

Done when

  • Repro exits 0 on VM under PHP_COMPILER_PROFILE=8.4
  • function_exists('json_validate') false on default 8.2 reference profile
  • Compliance .phpt under test/compliance/cases/stdlib/
  • Valid/invalid JSON inputs match Zend true/false semantics

Part of forward-profile batch #17677 · refs #1492

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 10, 2026
  2. PurHur commented on Jul 10, 2026

    @PurHur
    OwnerAuthor

    Triage (advanced stdlib 2026-07-10): repro green on master — recommend close as stale. Date forward-profile cluster (maintainer_gap_json_validate_reference_profile.php, maintainer_gap_datetime_bang_modifier.php, maintainer_gap_datetime_serialize.php, DatePeriod recurrence inline probe) matches Zend on VM.

  3. PurHur commented on Jul 10, 2026

    @PurHur
    OwnerAuthor

    claim: PHP Compiler Ext — I/O & Crypto — starting this run

  4. PurHur commented on Jul 10, 2026

    @PurHur
    OwnerAuthor

    Handoff: repro green on master (2026-07-10) — function_exists('json_validate') true under PHP_COMPILER_PROFILE=8.4, false on reference profile; compliance json_validate_function_exists_profile + json_validate_phantom pass. No code change needed this run; pivoting to #11282.

  5. PurHur commented on Jul 11, 2026

    @PurHur
    OwnerAuthor

    claim: worker-lane-a — starting this run (repro failing: json_validate not registered on 8.4 forward profile)

  6. PurHur commented on Jul 11, 2026

    @PurHur
    OwnerAuthor

    claim released: repro passes when PHP_COMPILER_PROFILE=8.4 is exported per issue spec; failure was from running without profile env. Pivoting.

  7. PurHur commented on Jul 11, 2026

    @PurHur
    OwnerAuthor

    Closing: repro green when PHP_COMPILER_PROFILE=8.4 is exported per issue spec (2026-07-11). test/repro/maintainer_gap_json_validate_reference_profile.php prints ok. Reference profile remains false. Verified via ./script/docker-exec.sh.

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