Skip to content

Stdlib: extension_loaded('gd') true — imagecreate() stub without ext/gd (ext/gd/gd.c) #11675

Closed

Description

@PurHur

Summary

extension_loaded('gd') returns true and function_exists('imagecreate') is true on VM while Zend (no ext/gd) reports both false. Calling imagecreate() throws Error — a phantom extension probe that misleads feature detection.

Mirrors #11669 / #11654 curl registry mismatches: skeleton ext/gd/Module.php registers as a full extension before libgd parity (#3496, #7407).

php-src reference

Repro

test/repro/maintainer_gap_extension_loaded_gd_phantom.php

./script/docker-exec.sh -- bash -lc 'php test/repro/maintainer_gap_extension_loaded_gd_phantom.php; php bin/vm.php test/repro/maintainer_gap_extension_loaded_gd_phantom.php'

Zend: loaded=no, imagecreate=no, probe=absent

VM: loaded=yes, imagecreate=yes, probe=Error

Expected (php-src-strict)

Until ext/gd is fully implemented, extension_loaded('gd'), function_exists('imagecreate'), and defined('IMG_*') must all agree (absent/false). Follow curl deferral pattern: register under standard or withhold module until #3496 ships.

Implementation hints

Done when

  • Repro matches Zend probe output on VM
  • No extension_loaded('gd') true while image functions unavailable

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 28, 2026

    @PurHur
    OwnerAuthor

    claim: PHP Compiler STD Lib — batch (issues #11675, #11676)

  3. PurHur commented on Jun 28, 2026

    @PurHur
    OwnerAuthor

    Merged via #13340. VM repro now prints loaded=no imagecreate=no probe=absent matching Zend.

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