Re: [PHP-DEV] Revisiting Userland Operator Overloads

2021-08-09 Thread Jordan LeDoux
On Mon, Aug 9, 2021 at 2:32 PM Mike Schinkel wrote: > However, you are actually making my point, which is that since they are so > deterministic then why is there the need for flexibility to be done in > userland vs. the standardization that could be could be better in PHP core? > For the latter

Re: [PHP-DEV] Revisiting Userland Operator Overloads

2021-08-09 Thread Jordan LeDoux
Apologies, this is being broken into two messages because of the 3 byte limit on the list. On Mon, Aug 9, 2021 at 2:32 PM Mike Schinkel wrote: > > Improving documentation is an easier fix than adding a complex language > feature. And a key difference is (almost?) anyone who is motivated

Re: [PHP-DEV] Revisiting Userland Operator Overloads

2021-08-09 Thread Mike Schinkel
On Aug 9, 2021, at 5:32 PM, Mike Schinkel wrote: > On Aug 9, 2021, at 1:48 PM, Jordan LeDoux wrote: > You claim that this would be documented on php.net and this would be > sufficient. Yet the DateTime class has had operator overloads for comparison > operators since 5.2 and there is still

Re: [PHP-DEV] RFC Implicit Async (iasync)

2021-08-09 Thread Olle Härstedt
On Mon, 9 Aug 2021, 21:41 the mschop, wrote: > Hi all, > > This is my first time writing to the internals mailing list, so please > be patient with me. I would like to get feedback from you on the > following idea. The idea might seem crazy at the first glance, but the > longer I thought of it,

Re: [PHP-DEV] mb_check_encoding slow performance?

2021-08-09 Thread Rowan Tommins
On 07/08/2021 18:57, Hans Henrik Bergan wrote: can someone shed some light on this? why does mb_check_encoding seem to be so much slower than the alternatives? benchmark code+results is here https://stackoverflow.com/a/68690757/1067003 Hi Hans, Since you ran the test on PHP 7.4, the relevant

[PHP-DEV] RFC Implicit Async (iasync)

2021-08-09 Thread the mschop
Hi all, This is my first time writing to the internals mailing list, so please be patient with me. I would like to get feedback from you on the following idea. The idea might seem crazy at the first glance, but the longer I thought of it, the cooler I found the idea ;-). I would like to share the

Re: [PHP-DEV] Revisiting Userland Operator Overloads

2021-08-09 Thread Jordan LeDoux
On Mon, Aug 9, 2021 at 11:40 AM Peter Cowburn wrote: > On Mon, 9 Aug 2021 at 18:48, Jordan LeDoux > wrote: > >> >> You claim that this would be documented on php.net and this would be >> sufficient. Yet the DateTime class has had operator overloads for >> comparison operators since 5.2 and

Re: [PHP-DEV] Revisiting Userland Operator Overloads

2021-08-09 Thread Peter Cowburn
On Mon, 9 Aug 2021 at 18:48, Jordan LeDoux wrote: > > You claim that this would be documented on php.net and this would be > sufficient. Yet the DateTime class has had operator overloads for > comparison operators since 5.2 and there is still *zero* mention on > php.net > (that I am aware of or

Re: [PHP-DEV] Revisiting Userland Operator Overloads

2021-08-09 Thread Jordan LeDoux
On Mon, Aug 9, 2021 at 3:49 AM Mike Schinkel wrote: > 1. When you speak of "not documented in the code" do you mean the > implementation would not be in PHP code? Okay, yet none of these functions > are documented in PHP code and they are all available in PHP: > >

Re: [PHP-DEV] Revisiting Userland Operator Overloads

2021-08-09 Thread Mike Schinkel
> On Aug 8, 2021, at 3:41 AM, Jordan LeDoux wrote: > > Off the top of my head here are some of the use cases that I think benefit > greatly from this: > > - Complex number objects > - Fractions objects > - Matrix objects (math) > - Vector objects (math) > - Time/Date intervals > - Collections