Category
Stdlib · php-src-strict · extension advertisement (re-shape of #22791 / #22790; gmp surface already landed via #3341+)
Problem
Host Zend without ext/gmp reports extension_loaded('gmp') false and function_exists('gmp_add') false. The VM always advertises gmp and executes gmp_add successfully on the default/reference profile.
GMP APIs themselves are largely implemented (#3341 and follow-ups). This ticket is the introspection / default-profile gate so extension_loaded / function_exists match Zend when gmp is not part of the reference build.
Probed 2026-07-24 (host PHP 8.2.32, gmp absent).
| Repro |
Zend 8.2+ (no gmp) |
VM (2026-07-24) |
extension_loaded('gmp') |
false |
true |
function_exists('gmp_add') |
false |
true |
gmp_strval(gmp_add('2','3')) |
undefined function |
5 |
php-src reference
PHP implementation target
Repro
./script/docker-exec.sh -- bash -lc 'php test/repro/extension_loaded_gmp_phantom.php'
./script/docker-exec.sh -- bash -lc 'php bin/vm.php test/repro/extension_loaded_gmp_phantom.php'
Done when
Category
Stdlib· php-src-strict · extension advertisement (re-shape of #22791 / #22790; gmp surface already landed via #3341+)Problem
Host Zend without
ext/gmpreportsextension_loaded('gmp')false andfunction_exists('gmp_add')false. The VM always advertises gmp and executesgmp_addsuccessfully on the default/reference profile.GMP APIs themselves are largely implemented (#3341 and follow-ups). This ticket is the introspection / default-profile gate so
extension_loaded/function_existsmatch Zend when gmp is not part of the reference build.Probed 2026-07-24 (host PHP 8.2.32, gmp absent).
extension_loaded('gmp')function_exists('gmp_add')gmp_strval(gmp_add('2','3'))5php-src reference
ext/gmp/gmp.c— module +gmp_*registrationext/standard/basic_functions.c—extension_loaded/function_existsPHP implementation target
ext/gmpModuleregistration /BuiltinIntrospectionPolicy(or equivalent extension policy) so default/reference profile matches Zend’s loaded setext/gmp— do not reintroduce C builtinsRepro
Done when
extension_loaded('gmp')andfunction_exists('gmp_add')are falsegmp_addstill works.phptundertest/compliance/cases/