Extending the PHP Language


Abstract

Do you wish that PHP had features that other languages have? Have you got some great ideas about how to extend PHP’s feature set but don’t want to go through the RFC process?

Great news. There is another way. It is possible to implement some new language features using static analysis.

This talk will briefly introduce the PHP Language Extension library; which offers features such as Java’s package level visibility and C++’s friend feature. Then, we’ll take a deep dive into how to create a custom PHPStan rule.

By the end of the talk, hopefully you’ll be inspired to create your own enhancements to PHP, or at the very least have a starting point to write your own custom rules.

Supporting repo.


See more talks.

Events
PHPCon Poland Nov 2023

[slides] [website]

PHPUGFFM (Frankfurt) May 2023

[slides] [website]

PHP UK Conference 2023 Feb 2023

[slides] [video] [website]

Amsterdam PHP User Group Jan 2023

[slides] [website]

IPC (Munich) Oct 2022

[slides] [website]