Re: [PHP-DEV] Re: Proposal for a RFC

2019-05-13 Thread Marco Pivetta
On Mon, 13 May 2019, 20:43 Steven Wade, wrote: > I don't think any of the discussion points mentioned above is resolved > > > I believe that most of the discussion points mentioned have been addressed > and resolved. Regarding the concern that an array cast is the only > operation capable of expo

Re: [PHP-DEV] Re: Proposal for a RFC

2019-05-13 Thread Steven Wade
> I'm personally unconvinced of the value of this, and would probably propose > it was blocked by coding standards in my team if it was added, because its > meaning is so ambiguous. That's perfectly reasonable. Do you also block use of casting to a string with (string) $foo as well? I ask because

Re: [PHP-DEV] Re: Proposal for a RFC

2019-05-13 Thread Steven Wade
> I don't think any of the discussion points mentioned above is resolved I believe that most of the discussion points mentioned have been addressed and resolved. Regarding the concern that an array cast is the only operation capable of exposing object state, the same functionality can be achieve

Re: [PHP-DEV] Re: Proposal for a RFC

2019-05-13 Thread Marco Pivetta
Hi Steven, On Mon, 13 May 2019, 15:46 Steven Wade, wrote: > > On May 4, 2019, at 10:58 AM, Steven Wade wrote: > > > > 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 ma

Re: [PHP-DEV] Re: [RFC] Allow throwing exceptions from __toString()

2019-05-13 Thread Andreas Heigl
Hey Nikita, hey all Am 13.05.19 um 16:05 schrieb Nikita Popov: > On Tue, Apr 30, 2019 at 3:32 PM Nikita Popov wrote: > >> Hi internals, >> >> I've already brought up this topic on list a couple of weeks ago... I've >> now updated the implementation based on feedback at the time, and turned >> th

Re: [PHP-DEV] Re: Proposal for a RFC

2019-05-13 Thread Rowan Collins
On Mon, 13 May 2019 at 14:46, Steven Wade wrote: > > Hi all, I wanted to re-ping the list to see if there is any more feedback > on this proposal? Any technical concerns or true BC changes? > I'm personally unconvinced of the value of this, and would probably propose it was blocked by coding st

[PHP-DEV] Re: [RFC] Allow throwing exceptions from __toString()

2019-05-13 Thread Nikita Popov
On Tue, Apr 30, 2019 at 3:32 PM Nikita Popov wrote: > Hi internals, > > I've already brought up this topic on list a couple of weeks ago... I've > now updated the implementation based on feedback at the time, and turned > this into a proper RFC: > > https://wiki.php.net/rfc/tostring_exceptions >

[PHP-DEV] Re: Proposal for a RFC

2019-05-13 Thread Steven Wade
> On May 4, 2019, at 10:58 AM, Steven Wade wrote: > > 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 h

Re: [PHP-DEV] PHP header files, restrict to declaring code only

2019-05-13 Thread Johannes Schlüter
On Fr, 2019-05-10 at 15:14 +0200, Lynn wrote: > Hi Nikita, > > By limiting a header file to declaring code only, a couple of issues > could > be tackled: > > 1. No side effects when loading files. You can assume the global > state > remains the same, no >    code is executed by this file, and no

Re: [PHP-DEV] PHP header files, restrict to declaring code only

2019-05-13 Thread Lynn
> Instead of introducing a declare option or special open tag, how about > another "include" construct, that only allows side-effect free (apart > from class loading) operations? > > e.g. "require_noexec 'foobar.php'" > > Regards, Niklas > Hi Niklas, That's indeed a very interesting alternative!