Extending the PHP Language
Learn how to implement new language features using static analysis.
1 talk, 8 articles
Learn how to implement new language features using static analysis.
Where appropriate should PHP updates start off in static analysis world before becoming part of the PHP language?
Learn how the InjectableVersion attribute ensures that correct interface of class is used in Dependency Injection.
Learn how the RestrictTraitTo attribute ensures that traits are used correctly.
Learn how the TestTag attribute helps with testing.
Learn how the NamespaceVisibility attribute emulates the missing package visibility modifier.
Learn how the MustUseResult attribute can prevent coding mistakes.
Learn how the Friend attribute can be used to enforce the usage of creational design patterns.
It's possible to use static analysis to emulate new language features in PHP. This article examines how, and introduces the PHP Language Extension Library.