Re: [PHP-DEV] [RFC] Property accessors

2021-05-04 Thread Matthew Brown
On Tue, 4 May 2021 at 06:34, Nikita Popov wrote: > Hi internals, > > I'd like to present an RFC for property accessors: > https://wiki.php.net/rfc/property_accessors > > Property accessors are like __get() and __set(), but for a single property. > They also support read-only properties and proper

Re: [PHP-DEV] [RFC] Property accessors

2021-05-04 Thread Dik Takken
On 04-05-2021 12:57, Marco Pivetta wrote: > * instead of allowing by-ref `get` declaration, can we just kill it here, > before it breeds again? I don't think I need to explain the woes of by-ref > to internals, but removing the ability to declare new accessors by-ref > would be a huge win for the

Re: [PHP-DEV] [RFC] Property accessors

2021-05-04 Thread Dik Takken
On 04-05-2021 12:33, Nikita Popov wrote: > Hi internals, > > I'd like to present an RFC for property accessors: > https://wiki.php.net/rfc/property_accessors Wow. Thanks for all the effort you put into this! > While I put a lot of effort into both the proposal and the implementation, > I've grow

Re: [PHP-DEV] [RFC] Property accessors

2021-05-04 Thread Robert Korulczyk
W dniu 04.05.2021 o 18:32, Marco Pivetta pisze: > I'd strongly advise killing by-ref array push there: it's an acceptable > limitation, for the amount of benefit we get :P > In fact, people doing `__get` now are already familiar with "Indirect > modification of overloaded property" (https://3v4l.or

Re: [PHP-DEV] [RFC] Property accessors

2021-05-04 Thread Marco Pivetta
Hey NikiC, On Tue, May 4, 2021 at 4:21 PM Nikita Popov wrote: > On Tue, May 4, 2021 at 12:58 PM Marco Pivetta wrote: > >> Hey NikiC, >> >> On Tue, May 4, 2021, 12:34 Nikita Popov wrote: >> >>> Hi internals, >>> >>> I'd like to present an RFC for property accessor

[PHP-DEV] [RFC] [Discussion] Final constants

2021-05-04 Thread Máté Kocsis
Hi Everyone, I've just written an RFC for final constants: https://wiki.php.net/rfc/final_class_const. The prior thread can be found at https://externals.io/message/114066 In my opinion, the main value proposition of this RFC are the following: - people can make their intention more clear that a

Re: [PHP-DEV] [RFC] Property accessors

2021-05-04 Thread Olle Härstedt
2021-05-04 12:33 GMT+02:00, Nikita Popov : > Hi internals, > > I'd like to present an RFC for property accessors: > https://wiki.php.net/rfc/property_accessors > > Property accessors are like __get() and __set(), but for a single property. > They also support read-only properties and properties wit

Re: [PHP-DEV] [RFC] Property accessors

2021-05-04 Thread Larry Garfield
On Tue, May 4, 2021, at 5:33 AM, Nikita Popov wrote: > Hi internals, > > I'd like to present an RFC for property accessors: > https://wiki.php.net/rfc/property_accessors > > Property accessors are like __get() and __set(), but for a single property. > They also support read-only properties and pr

Re: [PHP-DEV] [RFC] Property accessors

2021-05-04 Thread Nikita Popov
On Tue, May 4, 2021 at 12:58 PM Marco Pivetta wrote: > Hey NikiC, > > On Tue, May 4, 2021, 12:34 Nikita Popov wrote: > >> Hi internals, >> >> I'd like to present an RFC for property accessors: >> https://wiki.php.net/rfc/property_accessors >> >> Property accessors are like __get() and __set(), b

Re: [PHP-DEV] [RFC] Property accessors

2021-05-04 Thread Olle Härstedt
2021-05-04 15:57 GMT+02:00, Olle Härstedt : > 2021-05-04 12:33 GMT+02:00, Nikita Popov : >> Hi internals, >> >> I'd like to present an RFC for property accessors: >> https://wiki.php.net/rfc/property_accessors >> >> Property accessors are like __get() and __set(), but for a single >> property. >> T

Re: [PHP-DEV] [RFC] Property accessors

2021-05-04 Thread Olle Härstedt
2021-05-04 12:33 GMT+02:00, Nikita Popov : > Hi internals, > > I'd like to present an RFC for property accessors: > https://wiki.php.net/rfc/property_accessors > > Property accessors are like __get() and __set(), but for a single property. > They also support read-only properties and properties wit

Re: [PHP-DEV] feat(pdo): add `clearParams` method

2021-05-04 Thread Juanra GM
Hello Kamil, thanks you for your reply. I am going to enumerate the answers. 1. `PDOStatement::clearParams` should reset the statament params ( https://github.com/php/php-src/blob/31c74aaeebf3af3c87e3981703f9f775c65600b9/ext/pdo/pdo_stmt.c#L406-L410 ). 2. Recreate the prepared statement is very c

Re: [PHP-DEV] [RFC] Property accessors

2021-05-04 Thread Marco Pivetta
Hey NikiC, On Tue, May 4, 2021, 12:34 Nikita Popov wrote: > Hi internals, > > I'd like to present an RFC for property accessors: > https://wiki.php.net/rfc/property_accessors > > Property accessors are like __get() and __set(), but for a single property. > They also support read-only properties

Re: [PHP-DEV] [RFC] Property accessors

2021-05-04 Thread Joe Watkins
I haven't read it properly yet (been watching a little), but I just wanted to say thanks for the refreshing honesty :) Cheers Joe On Tue, 4 May 2021 at 12:34, Nikita Popov wrote: > Hi internals, > > I'd like to present an RFC for property accessors: > https://wiki.php.net/rfc/property_accessors

[PHP-DEV] [RFC] Property accessors

2021-05-04 Thread Nikita Popov
Hi internals, I'd like to present an RFC for property accessors: https://wiki.php.net/rfc/property_accessors Property accessors are like __get() and __set(), but for a single property. They also support read-only properties and properties with asymmetric visibility (public read, private write) as

Re: [PHP-DEV] feat(pdo): add `clearParams` method

2021-05-04 Thread Kamil Tekiela
Hi Juanra, Thanks for sharing your interest in improving PHP. Your proposal is very unclear at the moment. What do you think this function should do? Why can't you just recreate the prepared statement? What performance hit are you talking about? I don't see how such a function would be useful, but

[PHP-DEV] feat(pdo): add `clearParams` method

2021-05-04 Thread Juanra GM
Hi everybody. Currently it is not possible to clear the PDOStatement params, so it would be useful to add a method for it. Why? `PDOStatement::execute` admits the `$input_parameters` argument, but all values are passed as `PDO::PARAM_STR` and that hit a performance problem at MariaDB. The fix it