Re: Add $this return type
| From: | Juliette Reinders Folmer | Date: | Tue, 25 Jun 2024 21:25:11 +0000 |
| Subject: | Re: Add $this return type | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-123846@lists.php.net to get a copy of this message | ||
On 25-6-2024 19:53, radar3301 wrote:
Sebastian Bergmann said:Not a fan of using a variable as a return type. This will cause havoc for Tokenizer based static analysis tooling. Not a fan of the implicit return either. Also don't really see the need as there is the[snip] please not "$this" as the name for a type. Off the top of my head, I think that "same" could make sense.My primary vote would still be for "$this" as explained above, but I could potentially be persuaded to switch to "this" or "same" as alternatives if the dollar-sign is too much of a hang-up.
static return type already.