Skip to content

Regression: ParseUrl enum phantom on PROFILE≥8.4 — absent from php-src (re-#7260, ext/standard/basic_functions.stub.php) #28536

Closed

Description

@PurHur

Category

bug · php-src-strict · ext/standard · pillar 4 (re-#7260)

Problem

#7260 closed by adding a ParseUrl backed enum for parse_url() components. Authoritative Zend php:8.4-cli / php:8.5-cli have enum_exists(ParseUrl::class) === false — component selection remains the PHP_URL_* ints only.

Under PHP_COMPILER_PROFILE≥8.4 the compiler still registers int-backed ParseUrl with cases Scheme/Host/Port/User/Pass/Path/Query/Fragment. Default (8.2) profile correctly omits it.

Probed 2026-08-07 @ cee406e863.

Repro Zend 8.4/8.5 VM PROFILE=8.4/8.5 VM default
enum_exists(ParseUrl::class) false true false
(new ReflectionEnum(ParseUrl::class))->isBacked() n/a true n/a

php-src reference

PHP implementation target

  • ext/standard/BuiltinEnums.php — registerParseUrl(): do not register under any profile that mirrors current php-src (or gate off permanently until php-src grows the enum)
  • Call sites accepting ParseUrl::… as parse_url component — reject / TypeError like Zend
  • PHP-in-PHP; no new runtime/*.c

Repro

cat >/tmp/parseurl_phantom.php <<'PHP'
<?php
echo enum_exists(ParseUrl::class) ? 'yes' : 'no', "\n";
PHP
PHP_COMPILER_PROFILE=8.4 ./script/docker-exec.sh -- bash -lc 'php bin/vm.php /tmp/parseurl_phantom.php'
# Zend: docker run --rm -i php:8.4-cli php </tmp/parseurl_phantom.php
# Expect: no
# Actual: yes

Done when

  • enum_exists(ParseUrl::class) is false under PROFILE=8.4 and 8.5 (and default), matching Zend
  • parse_url() still accepts PHP_URL_* ints like Zend
  • Compliance/repro guard; php-src-strict

Activity

  1. added
    bugSomething isn't working
    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 Aug 7, 2026
  2. PurHur commented on Aug 8, 2026

    @PurHur
    OwnerAuthor

    claim: PHP Compiler STD Lib Advanced — batch (issues #28930, #28931, #28536, #28411) — ParseUrl after HTTP phantoms.

  3. PurHur commented on Aug 8, 2026

    @PurHur
    OwnerAuthor

    merged: ParseUrl phantom retired. Next in batch: #28411 MemoryUsage.

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 machinebugSomething isn't workingimplementation-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