public static function new(): static
{
return new static();
}
It really brings the point across it's static. public static function new(): static
{
return new static();
}
It really brings the point across it's static.It's not an excuse for slacking on language design.
A bit better, due from 7.x backward it really doesn't transmit any sense to me. Just confusion. And I'm not alone. See https://www.reddit.com/r/PHP/comments/elrnp4/rfc_for_static_...
static a(int a[static 1]);> The second and third 'static' indicate late static binding, meaning they refer to the class being called, rather than the class defining this method.
Wait, so they're using "static" to mean the binding is happening later? Isn't that essentially less static than binding against the class being defined?
It's less static than a method dependent on the object instance, but more static than a method that doesn't even depend on the class. If I've understood correctly (which I quite possibly haven't, in fairness), these are analogous to Python's static methods, class methods and regular methods, and its static methods really are the "most" static.