Re: [RFC] [Discussion] Improve callbacks in ext/dom and ext/xsl
| From: | Tim Düsterhus | Date: | Sat, 11 Nov 2023 15:32:35 +0000 |
| Subject: | Re: [RFC] [Discussion] Improve callbacks in ext/dom and ext/xsl | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-121655@lists.php.net to get a copy of this message | ||
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_xslSome question that I believe are not answered: 1. $xpath->registerPhpFunctions([ "foo" => ... ]); $xpath->registerPhpFunctions([ "foo" => ... ]); Is this an error due to the duplicate definition or will the last 'foo' win? 2. $xpath->registerPhpFunctions([]); Is this an error or a noop? 3. Would it make sense to deprecate passing a string as "Future Scope"? Simplifying the method signature would also allow to simplify the documentation in the long run and registering a string is trivially fixed by adding square brackets. In fact looking at the existing documentation at https://www.php.net/manual/en/domxpath.registerphpfunctions.php, what's the difference between 'php:function()' and 'php:functionString()'? Best regards Tim Düsterhus