Skip to content

Stdlib: extension_loaded('curl') true but curl_init() LogicException — phantom ext registration (ext/standard/info.c) #11627

Closed

Description

@PurHur

Category

stdlib · php-src-strict · same class as #11472 (intl/grapheme phantom extension_loaded)

Problem

extension_loaded('curl') reports true, but calling curl_init() throws LogicException: curl_init() is not implemented in this compiler build (issue #3325). Zend only returns true when the extension is actually loadable; feature probes must not lie.

Verified 2026-06-25 — php bin/vm.php.

php-src reference

Repro

test/repro/maintainer_gap_extension_loaded_curl.php

php bin/vm.php test/repro/maintainer_gap_extension_loaded_curl.php
Step Expected (php-src-strict) Actual
extension_loaded('curl') false until #3325 lands, or curl_init() works true + LogicException

Implementation hints (PHP-in-PHP)

  • Align extension_loaded() registry in ext/standard with modules that actually register handlers (skeleton #6999 should not mark curl loaded until curl_init is real)
  • Prefer fixing registry over try/catch stubs in user code

Done when

  • extension_loaded('curl') false until ext/curl handlers ship or curl_init() succeeds when loaded
  • Repro green; audit other skeleton extensions for same phantom pattern

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 Jun 25, 2026
  2. PurHur commented on Jun 25, 2026

    @PurHur
    OwnerAuthor

    claim: PHP Compiler STD Lib — batch (issues #11636, #11639, #11627)

  3. PurHur commented on Jun 25, 2026

    @PurHur
    OwnerAuthor

    Merged in PR #11648 — extension_loaded('curl') false while curl_init skeleton registered; VM + AOT -l verified.

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