Re: [PHP-DEV] NULL Coercion Consistency

2022-05-09 Thread Craig Francis
On 8 May 2022, at 12:38, Mark Randall wrote: > On 08/05/2022 11:48, Jordan LeDoux wrote: >> This is not the case with null. If you use the unset() function on a >> variable for example, it will var_dump as null *and* it will pass an >> is_null() check *and* it will pass a $var === null *and* it wi

Re: [PHP-DEV] NULL Coercion Consistency

2022-05-09 Thread Craig Francis
On 7 May 2022, at 22:11, Jordan LeDoux wrote: > On Sat, May 7, 2022 at 1:38 AM Craig Francis > wrote: > > Not what I'm going for... but anyway, to get an idea of your position, do you > think the string '15' should be coerced to a number, or should it fatal erro

Re: [PHP-DEV] The future of objects and operators

2022-05-09 Thread Larry Garfield
On Sat, May 7, 2022, at 3:59 PM, Jordan LeDoux wrote: > Of the people who did vote no and also provided me feedback, there were > *mainly* three reasons given (some in public such as on this list, and some > in private in more direct conversation): > > 1. Math is not a valid use case. > 2. Operato

Re: [PHP-DEV] NULL Coercion Consistency

2022-05-09 Thread Rowan Tommins
On 09/05/2022 10:06, Robert Landers wrote: If you are writing library code, it is 8.1 compatible to avoid people opening issues about spamming their logs. Yes, I understand that such complaints are common, but we should be working to provide documentation and tooling to those users, rather th

Re: [PHP-DEV] NULL Coercion Consistency

2022-05-09 Thread Craig Francis
On 7 May 2022, at 18:16, Aleksander Machniak wrote: > On 07.05.2022 13:29, Mel Dafert wrote: >> It is exactly user-defined functions that this RFC introduces breakage for. >> The behaviour to throw on null in user-defined functions exists since PHP >> 7.0, and is being relied on. Changing these no

Re: [PHP-DEV] NULL Coercion Consistency

2022-05-09 Thread Robert Landers
On Mon, May 9, 2022 at 10:18 AM Rowan Tommins wrote: > > On 08/05/2022 22:33, Björn Larsson via internals wrote: > > It's not only ugly code ;) To make your program/application/library 8.1 > > compatible using that codepattern requires en effort, but brings close > > to zero improvement, except be

Re: [PHP-DEV] NULL Coercion Consistency

2022-05-09 Thread Rowan Tommins
On 08/05/2022 22:33, Björn Larsson via internals wrote: It's not only ugly code ;) To make your program/application/library 8.1 compatible using that codepattern requires en effort, but brings close to zero improvement, except being 8.1 compatible. So the net effect is negative. Important cor

[PHP-DEV] Declaring tidyNode properties as readonly?

2022-05-09 Thread Máté Kocsis
Hi Internals, When I was working on making the properties of the tidy and tidyNode classes declared (https://github.com/php/php-src/pull/8515), I noticed that it doesn't make sense to write the properties of tidyNode, as the property changes won't have any effect on the parsed HTML node. Christoph