Category
stdlib · php-src-strict · ext/ldap · JIT/AOT lowering
Problem
ldap_compare() works on the VM via VmLdapCore::compare(), but compiled JIT/AOT calls still throw LogicException from call() in ext/ldap/ldap_result_builtins.php. This leaves compiled PHP behind the existing PHP-side runtime path even though the semantics already live in ext/ldap/ and VmLdapNative.
| Repro |
Zend 8.2+ |
VM |
JIT/AOT |
ldap_compare($ldap, "cn=x", "cn", "x") |
callable |
callable |
LogicException today |
php-src reference
PHP implementation target
ext/ldap/ldap_result_builtins.php — replace the JIT stub in ldap_compare::call()
ext/ldap/JitLdapResult.php + ext/ldap/LdapResultJitHelper.php — lower handle + string args through PHP helper code
lib/JIT/Builtin/LdapRuntime.php — register the bridge; keep behavior in PHP, no new runtime/*.c logic
Repro
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php -d display_errors=1 ./phpc run test/repro/issue_ldap_compare_jit.php'
Done when
Category
stdlib· php-src-strict · ext/ldap · JIT/AOT loweringProblem
ldap_compare()works on the VM viaVmLdapCore::compare(), but compiled JIT/AOT calls still throwLogicExceptionfromcall()inext/ldap/ldap_result_builtins.php. This leaves compiled PHP behind the existing PHP-side runtime path even though the semantics already live inext/ldap/andVmLdapNative.ldap_compare($ldap, "cn=x", "cn", "x")LogicExceptiontodayphp-src reference
ext/ldap/ldap.c—PHP_FUNCTION(ldap_compare)PHP implementation target
ext/ldap/ldap_result_builtins.php— replace the JIT stub inldap_compare::call()ext/ldap/JitLdapResult.php+ext/ldap/LdapResultJitHelper.php— lower handle + string args through PHP helper codelib/JIT/Builtin/LdapRuntime.php— register the bridge; keep behavior in PHP, no newruntime/*.clogicRepro
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php -d display_errors=1 ./phpc run test/repro/issue_ldap_compare_jit.php'Done when
LDAP\Connection,string $dn,string $attribute,string $valuewith php-src-strict type errorstrue/false/-1plus warning/errno side effects