Re: [PHP-DEV] [RFC] Pipe Assignment Operator
[email protected] (Tim Düsterhus) Mon, 20 Jul 2026 17:24:20 +0200
| Newsgroups | php.internals |
|---|---|
| Message-ID | <[email protected]> |
Hi On 2026-07-20 16:55, Bob Weinand wrote: > I just have one more question to the RFC author, which I see in the > implementation, but the RFC is not explicitly noting: > Is it intentional that fetching is repeated? I would consider that a bug in the implementation, given that the “Single-Evaluation Guarantee” section mentions: > When the LHS contains sub-expressions, they are evaluated exactly once: and > This is the same guarantee that ??= provides over $x = $x ?? default, > implemented using the same compile-time memoization mechanism. Thus if it behaves differently to `??=`, it's a bug in the implementation :-) Best regards Tim Düsterhus