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

2019-03-01 Thread Johannes Schlüter
On March 1, 2019 10:52:02 PM GMT+01:00, "Christoph M. Becker" wrote: >On 01.03.2019 at 21:31, Johannes Schlüter wrote: > >> On Fr, 2019-03-01 at 18:28 +0100, Nikita Popov wrote: >>> made the same mistake there. So there's one more point to add to the >>> extension guidelines: >> >> Do we have

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

2019-03-01 Thread Christoph M. Becker
On 01.03.2019 at 21:31, Johannes Schlüter wrote: > On Fr, 2019-03-01 at 18:28 +0100, Nikita Popov wrote: >> made the same mistake there. So there's one more point to add to the >> extension guidelines: > > Do we have a persistent space to keep those? The internals manual is > limited ... :-) And

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

2019-03-01 Thread Johannes Schlüter
On Fr, 2019-03-01 at 18:28 +0100, Nikita Popov wrote: > made the same mistake there. So there's one more point to add to the > extension guidelines: Do we have a persistent space to keep those? The internals manual is limited ... :-) > I'm happy to find and fix these bugs, rather than leave the l

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

2019-03-01 Thread Nikita Popov
On Fri, Mar 1, 2019 at 5:24 PM Johannes Schlüter wrote: > On Fr, 2019-03-01 at 12:25 +0100, Nikita Popov wrote: > > > For extension authors, the guideline is: > > Will zend_parse_paramters and related detect if an exception is thrown > and fail? > Yes, of course :) That's one of the most importa

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

2019-03-01 Thread Johannes Schlüter
On Fr, 2019-03-01 at 12:25 +0100, Nikita Popov wrote: > For extension authors, the guideline is: Will zend_parse_paramters and related detect if an exception is thrown and fail? I believe things like database (or other network) extensions have to be really carefully checked, not that we store co

[PHP-DEV] Allow throwing from __toString()

2019-03-01 Thread Nikita Popov
Hi internals, We currently forbid throwing exceptions from __toString() and instead convert them into fatal errors. The rationale for this behavior is that string conversions are performed in many places throughout the engine and standard library, and not all places performing these conversions wi