Category
stdlib
Problem
crypt() is not registered. Zend exposes the legacy one-way hash API (CRYPT_STD_DES, CRYPT_EXT_DES, CRYPT_MD5, CRYPT_BLOWFISH). This compiler implements password_hash() / password_verify() via libcrypt in AOT (lib/AOT/runtime/password_crypto.c) but does not expose the standalone crypt() builtin.
php-src reference
Repro (failure today)
<?php
$salt = '$2y$10$' . str_repeat('a', 22);
echo crypt('secret', $salt), "\n";
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php bin/vm.php -r "echo function_exists(\"crypt\")?\"yes\":\"no\";"'
# no
Zend PHP 8.x: 60-char bcrypt hash string
This compiler (VM): fatal — undefined function crypt
Scope (this repo)
| Layer |
Files |
Notes |
| VM |
ext/standard/crypt.php, ext/standard/VmPassword.php (reuse libcrypt helpers) |
Delegate to host crypt(3) or reuse AOT runtime |
| JIT/AOT |
ext/standard/JitPassword.php / lib/AOT/runtime/password_crypto.c |
Share setting validation with password_hash() |
| Register |
ext/standard/Module.php |
Export CRYPT_* constants |
| Tests |
test/compliance/cases/stdlib/crypt.phpt |
Bcrypt salt round-trip subset |
Done when
Verification
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php bin/vm.php repro.php'
php repro.php # compare output
Links
Category
stdlibProblem
crypt()is not registered. Zend exposes the legacy one-way hash API (CRYPT_STD_DES,CRYPT_EXT_DES,CRYPT_MD5,CRYPT_BLOWFISH). This compiler implementspassword_hash()/password_verify()via libcrypt in AOT (lib/AOT/runtime/password_crypto.c) but does not expose the standalonecrypt()builtin.php-src reference
PHP_FUNCTION(crypt),php_crypt()CRYPT_*constantsRepro (failure today)
Zend PHP 8.x: 60-char bcrypt hash string
This compiler (VM): fatal — undefined function
cryptScope (this repo)
ext/standard/crypt.php,ext/standard/VmPassword.php(reuse libcrypt helpers)crypt(3)or reuse AOT runtimeext/standard/JitPassword.php/lib/AOT/runtime/password_crypto.cpassword_hash()ext/standard/Module.phpCRYPT_*constantstest/compliance/cases/stdlib/crypt.phptDone when
function_exists('crypt')is true on VM*sentinel (Zend parity)./script/ci-fast.sh --filter cryptgreendocs/capabilities.mdrow forcryptVerification
Links