rfc:core-autoloading
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
rfc:core-autoloading [2023/04/10 12:14] – Status: Under Discussion girgias | rfc:core-autoloading [2023/04/23 14:24] (current) – danack | ||
---|---|---|---|
Line 249: | Line 249: | ||
Passing < | Passing < | ||
+ | |||
+ | The current RFC as proposed has a large BC break for the code: | ||
+ | |||
+ | <PHP> | ||
+ | |||
+ | namespace foo; | ||
+ | |||
+ | var_dump(function_exists(' | ||
+ | var_dump(strlen(' | ||
+ | var_dump(function_exists(' | ||
+ | |||
+ | if (true) { | ||
+ | function strlen($x) { return 42; } | ||
+ | var_dump(function_exists(' | ||
+ | } | ||
+ | |||
+ | var_dump(strlen(' | ||
+ | |||
+ | </ | ||
+ | |||
+ | Which needs to be thought about. | ||
===== Proposed PHP Version ===== | ===== Proposed PHP Version ===== | ||
Line 396: | Line 417: | ||
For programs that do not have a function autoloader registered, there will be no autoloader to dispatch, so there will be almost no performance change. | For programs that do not have a function autoloader registered, there will be no autoloader to dispatch, so there will be almost no performance change. | ||
- | Whether or not a fuction | + | Whether or not a function |
As the code example shows, after a successful attempt to autoload a function in a namespace, or the global function fallback occurs, the function is ' | As the code example shows, after a successful attempt to autoload a function in a namespace, or the global function fallback occurs, the function is ' |
rfc/core-autoloading.1681128840.txt.gz · Last modified: 2023/04/10 12:14 by girgias