Skip to content

Regression: crypt/quotemeta/strrev/str_rot13 Reflection names str — Zend string; named args rejected (ext/standard/basic_functions.stub.php) #23264

Description

@PurHur

Category

bug · php-src-strict · named arguments / Reflection

Problem

Positional calls match Zend, but Reflection reports InternalArgInfo-style str instead of Zend stub string, and Zend-style named $string fails. Probed 2026-07-26 vs host Zend 8.2.32.

Repro Zend 8.2 VM (2026-07-26)
Reflection (crypt) string,salt str,salt
Reflection (quotemeta/strrev/str_rot13) string str
strrev(string: "ab") "ba" Unknown named parameter $string
quotemeta(string: ".+") "\\.+" Unknown named parameter $string
str_rot13(string: "ab") "no" Unknown named parameter $string
crypt(string: "x", salt: "$1\$xxxxxxxx$") hash Unknown named parameter $string

php-src reference

PHP implementation target

  • lib/BuiltinParamNames.phpcrypt['string','salt']; others → ['string']
  • Reflection + named-arg dispatch; PHP-in-PHP only; no new C

Repro

./script/docker-exec.sh -- bash -lc 'php bin/vm.php -r '\''try { echo strrev(string:"ab"), "\n"; } catch (Throwable $e) { echo $e->getMessage(), "\n"; }'\'''

Done when

  • Reflection names use string (and salt for crypt)
  • Zend-style named calls match Zend on VM
  • Compliance .phpt + test/repro/issue_NNNN_*.php
  • php-src-strict; no php-compiler-strict shortcut

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:vmVirtual machinebugSomething isn't workingimplementation-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