Re: [PHP-DEV] Method parameter promotion support

2020-11-30 Thread Nikita Popov
On Thu, Nov 26, 2020 at 5:31 PM David Rodrigues wrote: > Hello! > > It is just an idea to discuss. PHP 8 now supports parameter promotion via > constructor. Could this idea also work for common methods? > > public function setAge(private int $age) {} > === > private int $age; > public function se

Re: [PHP-DEV] Method parameter promotion support

2020-11-26 Thread Sara Golemon
On Thu, Nov 26, 2020 at 10:43 AM Pierre R. wrote: > Le 26/11/2020 à 17:30, David Rodrigues a écrit : > > It is just an idea to discuss. PHP 8 now supports parameter promotion via > > constructor. Could this idea also work for common methods? > > > > public function setAge(private int $age) {} > >

Re: [PHP-DEV] Method parameter promotion support

2020-11-26 Thread Pierre R.
Le 26/11/2020 à 17:30, David Rodrigues a écrit : Hello! It is just an idea to discuss. PHP 8 now supports parameter promotion via constructor. Could this idea also work for common methods? public function setAge(private int $age) {} === private int $age; public function setAge(int $age) { $this