On 26 August 2021 21:20:35 BST, "Olle Härstedt" <olleharst...@gmail.com> wrote:
>The Foo class has to decide who to give access to, otherwise it's the
>same as public access.


It does decide who has access: any class that declares it as "delegated". In 
exactly the same way, "protected" gives access to any class that declares it as 
a "parent", and namespace visibility would give access to any class that 
declares itself in the same namespace.

None of those actually limit access to a named list of classes, but all of them 
document an intended use, and catch mistakes where that intent isn't followed.

Regards,

-- 
Rowan Tommins
[IMSoP]

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to