[PHP-DEV] Re: Proposal for a RFC

2019-05-04 Thread Mark Randall
On 04/05/2019 15:58, Steven Wade wrote: The idea is to add a new magic method "__toArray()" that would allow a developer to specifiy how a class is cast to an array. The idea is the same mentality of __toString(), but, for arrays. I see possibilities for it, and on a slightly wider approach,

Re: [PHP-DEV] Proposal for a RFC

2019-05-04 Thread Marco Pivetta
Hi Steven, As it currently stands, the array cast is the only operation capable of exposing object state without triggering any kind of access guards: it is very much required for anything that works with reflection and typed properties, and possibly the only operation in PHP that operates on

Re: [PHP-DEV] Proposal for a RFC

2019-05-04 Thread Paul Jones
> On May 4, 2019, at 11:08, Kalle Sommer Nielsen wrote: > > Hi > > Den lør. 4. maj 2019 kl. 17.58 skrev Steven Wade : >> >> Hi Internals team! >> >> I have an idea for a feature that I'd love to see in the language one day >> and wanted to run the idea by you all. >> >> The idea is to add

Re: [PHP-DEV] Proposal for a RFC

2019-05-04 Thread Kalle Sommer Nielsen
Hi Den lør. 4. maj 2019 kl. 17.58 skrev Steven Wade : > > Hi Internals team! > > I have an idea for a feature that I'd love to see in the language one day and > wanted to run the idea by you all. > > The idea is to add a new magic method "__toArray()" that would allow a > developer to specifiy

Re: [PHP-DEV] Proposal for a RFC

2019-05-04 Thread Kalle Sommer Nielsen
> I find it easy to imagine that objects not implementing __toArray() would > continue to exhibit that behavior. Obviously. So what about code that operates on this behavior, should that then suddenly break if the object implements an __toArray() method? That sounds wrong to me -- regards,

Re: [PHP-DEV] Proposal for a RFC

2019-05-04 Thread Paul Jones
Hi Steven, > The idea is to add a new magic method "__toArray()" that would allow a > developer to specifiy how a class is cast to an array. The idea is the same > mentality of __toString(), but, for arrays. I'd like to see this as well. -- Paul M. Jones pmjo...@pmjones.io

[PHP-DEV] Proposal for a RFC

2019-05-04 Thread Steven Wade
Hi Internals team! I have an idea for a feature that I'd love to see in the language one day and wanted to run the idea by you all. The idea is to add a new magic method "__toArray()" that would allow a developer to specifiy how a class is cast to an array. The idea is the same mentality of

Re: [PHP-DEV] Re: [RFC VOTE] Unbundle ext/interbase

2019-05-04 Thread Christoph M. Becker
Hi Kalle! On 04.05.2019 at 13:33, Kalle Sommer Nielsen wrote: > Den lør. 4. maj 2019 kl. 14.19 skrev Christoph M. Becker : >> >> On 04.05.2019 at 10:56, Christoph M. Becker wrote: >> >>> I have submitted PR #4112 to bring back the common PDO tests, which are >>> the majority of existing tests

Re: [PHP-DEV] Re: [RFC VOTE] Unbundle ext/interbase

2019-05-04 Thread Kalle Sommer Nielsen
Hi Christoph Den lør. 4. maj 2019 kl. 14.19 skrev Christoph M. Becker : > > On 04.05.2019 at 10:56, Christoph M. Becker wrote: > > > I have submitted PR #4112 to bring back the common PDO tests, which are > > the majority of existing tests for pdo_firebird. Three tests are > > failing (which

Re: [PHP-DEV] Re: [RFC VOTE] Unbundle ext/interbase

2019-05-04 Thread Christoph M. Becker
On 04.05.2019 at 10:56, Christoph M. Becker wrote: > I have submitted PR #4112 to bring back the common PDO tests, which are > the majority of existing tests for pdo_firebird. Three tests are > failing (which should be investigated), but these tests already failed > in PHP-7.3 and maybe before.

Re: [PHP-DEV] Re: [RFC VOTE] Unbundle ext/interbase

2019-05-04 Thread Christoph M. Becker
Hi Kalle! On 03.05.2019 at 19:00, Kalle Sommer Nielsen wrote: > Den fre. 3. maj 2019 kl. 12.02 skrev Christoph M. Becker : > >> While running the tests with a PHP debug version, I've noticed that >> bug_aaa.phpt is causing a memory leak. Maybe someone proficient with >> Firebird/Interbase will