Hi
On 3/6/25 20:08, Niels Dossche wrote:
What I'm less in favor of is the implementation choice to expose the inner
class as a property/const and using a fetch mode to grab it.
That feels quite weird to me honestly. How did you arrive at this choice?
Somewhat relatedly, the RFC does not mention how the choice of `::` as
the separator interacts with the following features (i.e. what will the
result of each of the statements be):
Closure::fromCallable('Outer::Inner::method');
new ReflectionMethod('Outer::Inner::method');
defined('Outer::Inner');
constant('Outer::Inner');
$inner = 'Inner';
Outer::{$inner};
… and any other meta-programming functionality working on class
constants or static methods.
Also, what will happen for:
class P {
class Inner { }
}
class C extends P {
const Inner = 'x';
}
(and vice versa)
Best regards
Tim Düsterhus