You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement namespace extraction utilities for visibility checks
Add helper functions to extract and compare namespaces at runtime:
* zend_extract_namespace() - Extracts "Foo\Bar" from "Foo\Bar\ClassName"
* zend_get_class_namespace() - Gets namespace from class entry name
* zend_get_caller_namespace() - Determines namespace of executing code
- From methods: uses class namespace
- From functions: uses op_array->namespace_name
- From top-level: uses op_array->namespace_name
These utilities will be used by visibility checking code to enforce
namespace-scoped access rules.
Important: For trait methods, scope is the class that uses the trait,
not the trait itself. This means private(namespace) in traits is checked
against the receiver's namespace, which is the desired behavior.
0 commit comments