rfc:on_demand_name_mangling

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
rfc:on_demand_name_mangling [2019/07/16 12:24] – Updated to contemporary PHP versions and readied for vote. bishoprfc:on_demand_name_mangling [2019/07/16 12:25] (current) – Settled on formal polyfill name, php_mangle_superglobal bishop
Line 62: Line 62:
 <?php <?php
 print_r(get_defined_vars()); print_r(get_defined_vars());
-mangle_superglobals();+php_mangle_superglobals();
 print_r(get_defined_vars()); print_r(get_defined_vars());
 ?> ?>
Line 87: Line 87:
 </code> </code>
  
-In this new implementation, the engine no longer mangles marshaled superglobals at startup.  Instead, the //ability// to mangle names has moved to an optional, userland-provided polyfill function ''mangle_superglobals()''.+In this new implementation, the engine no longer mangles marshaled superglobals at startup.  Instead, the //ability// to mangle names has moved to an optional, userland-provided polyfill function ''php_mangle_superglobals()''.
  
-In the example above, an ''a_b'' key was externally supplied. The call to ''mangle_superglobals'' clobbered the original value of ''a_b'' with the value of the //last// seen mangle-equivalent key (''a[b'').+In the example above, an ''a_b'' key was externally supplied. The call to ''php_mangle_superglobals'' clobbered the original value of ''a_b'' with the value of the //last// seen mangle-equivalent key (''a[b'').
  
 Importantly, the user made this mangling happen: the engine did not do it automatically. Importantly, the user made this mangling happen: the engine did not do it automatically.
rfc/on_demand_name_mangling.1563279858.txt.gz · Last modified: 2019/07/16 12:24 by bishop