On Thu, Mar 25, 2021 at 4:23 AM Levi Morrison via internals < internals@lists.php.net> wrote:
> [...] > Instead of writing this: > > ``` > class A > { > public function method($arg1) > { > return expr($arg1); > } > } > ``` > > I can write this: > > ``` > class A { > function method($arg1) { return expr($arg1); } > } > ``` > For what it's worth (probably not much), when fiddling with quick test code samples (e.g. on 3v4l with "quick preview"), more than once I have written things like this: ``` class A { function method($arg1) { expr($arg1); } } ``` i.e. I initially forgot the "return " (and had to go back and add it). I would surely not have this problem anymore with this: ``` class A { function method($arg1) => expr($arg1); } ``` (It also seems I don't have this problem when writing a return on its own line :/) Regards, -- Guilliam Xavier