A PHP internals mailing list thread discussing a Pre-RFC proposal for scalar object methods — allowing syntax like `$s->trim()` as compile-time sugar for `Str::trim($s)`. The author clarifies dispatch rules: only typed locals, literals, casts, and typed properties are valid receivers; untyped variables never dispatch. The proposal uses .stub.php files (already consumed by PhpStorm, PHPStan, Psalm) for definitions, with a NUL-prefixed runtime symbol. Key design decisions include restricting user-function chaining to internal functions only, handling arity mismatches via normal ArgumentCountError/TypeError, and keeping the initial method set minimal to demonstrate the mechanism.
116 Impressions