42

Using PHP Anonymous Classes as Package Private Classes | Mark Baker's B...

 5 years ago
source link: https://markbakeruk.net/2018/06/25/using-php-anonymous-classes-as-package-private-classes/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
I've written before about the benefits of using PHP's Anonymous Classes for test doubles; but Anonymous Classes also have potential usecases within production code as well. In this article I'm going to describe one such usecase that can be particularly useful within libraries, and that is replicating the access of Package Private (in Java), or…

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK