rfc:improve_callbacks_dom_and_xsl
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:improve_callbacks_dom_and_xsl [2023/12/19 15:37] – Small clarification, no semantic changes nielsdos | rfc:improve_callbacks_dom_and_xsl [2024/02/12 14:24] (current) – derick | ||
---|---|---|---|
Line 3: | Line 3: | ||
* Date: 2023-11-05 | * Date: 2023-11-05 | ||
* Author: Niels Dossche, nielsdos@php.net | * Author: Niels Dossche, nielsdos@php.net | ||
- | * Status: | + | * Status: |
+ | * Implementation: | ||
* First Published at: https:// | * First Published at: https:// | ||
+ | * Target: PHP 8.4 | ||
===== Introduction ===== | ===== Introduction ===== | ||
Line 106: | Line 108: | ||
Whether the value is callable will now be checked during registration instead of during execution. | Whether the value is callable will now be checked during registration instead of during execution. | ||
+ | |||
+ | ==== Method signature ==== | ||
+ | |||
+ | The method signature of < | ||
+ | You might be wondering why I don't change the string type in that union to callable. There are two reasons: | ||
+ | - callable|array is ambiguous: what does < | ||
+ | - XPath expressions are written as strings, so we have to give a string name to the callable. | ||
==== Additional registerPhpFunctionNS API ==== | ==== Additional registerPhpFunctionNS API ==== | ||
+ | |||
+ | This section is based on the feature request: https:// | ||
We can go even further and // | We can go even further and // | ||
Line 163: | Line 174: | ||
Finally, both for < | Finally, both for < | ||
- | |||
- | ==== Method signature ==== | ||
- | |||
- | The method signature of < | ||
- | You might be wondering why I don't change the string type in that union to callable. There are two reasons: | ||
- | - callable|array is ambiguous: what does < | ||
- | - XPath expressions are written as strings, so we have to give a string name to the callable. | ||
==== Usage examples of the API improvement ==== | ==== Usage examples of the API improvement ==== | ||
Line 278: | Line 282: | ||
In this case, no functions are registered. | In this case, no functions are registered. | ||
- | |||
- | ==== Alternatives ==== | ||
- | |||
- | I considered an alternative solution too: https:// | ||
- | |||
- | In that feature request, the idea is to add a new < | ||
- | Or more generally, the alternative is that we add < | ||
===== Backward Incompatible Changes ===== | ===== Backward Incompatible Changes ===== | ||
Line 317: | Line 314: | ||
===== Proposed Voting Choices ===== | ===== Proposed Voting Choices ===== | ||
- | Two primary votes requiring 2/3rd majority: | + | Two primary votes each requiring 2/3rd majority. |
- | | + | |
- | - Add registerPhpFunctionNS to ext/dom and ext/xsl? | + | Accept the proposed changes to registerPhpFunctions |
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | |||
+ | Add registerPhpFunctionNS to ext/dom and ext/xsl? | ||
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
===== Patches and Tests ===== | ===== Patches and Tests ===== | ||
Line 326: | Line 340: | ||
===== Implementation ===== | ===== Implementation ===== | ||
- | After the project is implemented, | + | |
- | - the version(s) it was merged | + | Merged |
- | | + | |
- | - a link to the PHP manual | + | Manual |
- | - a link to the language specification section (if any) | + | |
===== References ===== | ===== References ===== |
rfc/improve_callbacks_dom_and_xsl.1703000259.txt.gz · Last modified: 2023/12/19 15:37 by nielsdos