You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
strlen($obj) on a Stringable object throws TypeError: strlen(): Argument #1 ($string) must be of type string, C given. Zend returns the byte length of the __toString() result (3 for 'obj').
Sibling builtins trim() / ltrim() / rtrim() / chop() / strtoupper() already coerce Stringable objects on VM — only strlen() rejects.
Activity
PurHur commentedon Jun 29, 2026
claim: PHP Runtime → PHP — batch (issues #13468 #13467)
PurHur commentedon Jun 29, 2026
Merged via #13480 — VM/JIT strlen(Stringable) returns __toString byte length; compliance
strlen_stringable.phptgreen.