Re: [PHP-DEV] Array functions with strict comparison

2023-11-11 Thread Andreas Hennings
Hello David, On Sat, 11 Nov 2023 at 20:04, David Gebler wrote: > > On Sat, Nov 11, 2023 at 6:05 PM Andreas Hennings > wrote: > > > Hello internals, > > I noticed that array functions like array_diff(), array_intersect() > > etc use weak comparison. > > > > > That's not quite correct. Using the e

Re: [PHP-DEV] Array functions with strict comparison

2023-11-11 Thread David Gebler
On Sat, Nov 11, 2023 at 6:05 PM Andreas Hennings wrote: > Hello internals, > I noticed that array functions like array_diff(), array_intersect() > etc use weak comparison. > > That's not quite correct. Using the example of array_diff, the comparison is a strict equality check on a string cast of

[PHP-DEV] Array functions with strict comparison

2023-11-11 Thread Andreas Hennings
Hello internals, I noticed that array functions like array_diff(), array_intersect() etc use weak comparison. E.g. array_diff([0, '', false, null], [null]) only leaves [0]. This makes these functions useless for a number of applications. Also it can lead to unpleasant surprises, if a developer is

Re: [PHP-DEV] [RFC] [Discussion] Improve callbacks in ext/dom and ext/xsl

2023-11-11 Thread Niels Dossche
Hi Tim On 11/11/23 16:32, Tim Düsterhus wrote: > Hi > > On 11/7/23 20:32, Niels Dossche wrote: >> I'm opening the discussion for my RFC "Improve callbacks in ext/dom and >> ext/xsl". >> RFC link: https://wiki.php.net/rfc/improve_callbacks_dom_and_xsl > > Some question that I believe are not ans

Re: [PHP-DEV] [RFC] [Discussion] Improve callbacks in ext/dom and ext/xsl

2023-11-11 Thread Tim Düsterhus
Hi On 11/7/23 20:32, Niels Dossche wrote: I'm opening the discussion for my RFC "Improve callbacks in ext/dom and ext/xsl". RFC link: https://wiki.php.net/rfc/improve_callbacks_dom_and_xsl Some question that I believe are not answered: 1. $xpath->registerPhpFunctions([ "foo" => ... ]); $