Skip to content

Regression: extension_loaded('zip') + ZipArchive phantom — advertises without ext/zip (re-#11676, ext/zip/php_zip.c) #18137

Description

@PurHur

Category

stdlib · php-src-strict

Problem

On the pinned Docker harness (no ext/zip built), Zend reports extension_loaded('zip') === false and class_exists('ZipArchive', false) === false. php-compiler advertises both, creating a phantom extension surface (function_exists('zip_open') remains false, but autoload/feature probes see zip as present).

Repro Zend 8.2 VM (2026-07-12)
extension_loaded('zip') false true
class_exists('ZipArchive', false) false true
function_exists('zip_open') false false

php-src reference

PHP implementation target

Repro

./script/docker-exec.sh -- bash -lc 'php bin/vm.php test/repro/maintainer_gap_zip_extension_phantom.php'
# Zend: ok · VM: fail

Done when

Activity

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

    @PurHur
    OwnerAuthor

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

  3. PurHur commented on Jul 12, 2026

    @PurHur
    OwnerAuthor

    Merged via #18159.

    Verification (reference profile):

    php bin/vm.php test/repro/maintainer_gap_zip_extension_phantom.php  → ok
    extension_loaded('zip') / ZipArchive / zip_open → 0 0 0
    vendor/bin/phpunit test/compliance/VMTest.php --filter extension_loaded_zip → OK (2 tests)
    

    Forward profile: PHP_COMPILER_PROFILE=8.4 enables zip (1 1 1).

    Implementation: CompilerVersion::supportsZip() + msgpack-style module gating in ext/zip/Module.php / ZipExtensionPolicy.php.

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 workingenhancementNew 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