PHP 7 introduced type declarations and so brought PHP into the world of strict typing. Each subsequent release in the 7 series has improved this and PHP 7.4 is no different with exciting new type features. In addition, PHP 7 enabled static analysis tools that coupled with type declarations enable us to significantly remove bugs in our code before we even run it! In this talk, I will review PHP's strict type system, including the new PHP 7.4 features and show how they can make our code safer and clearer and easier to reason about. We will then turn our attention to the available static analysis tools and look at how, with strict typing, we can eliminate whole classes of bugs and make our applications better. By the end of this session, you will be well placed to write better PHP code that has fewer bugs and works as you expect every time.


Comments are closed.

Mike Oram at 20:04 on 8 Jan 2020

Great topic with a lot of information. Felt a little slow at the start but sets the scene well for people who need the wider context. Liked the overview of 3 different tools rather than focusing on just one. The recap at the end was very helpful

Saved me a bunch of time learning about phan & Psalm and comparing them with Stan. Liked the setup/configure slides. Improvements? Not sure but maybe how could be used to check specific aspects of legacy code in preparation for a PHP version upgrade. If Rob found 5000+ issues with his code, I hesitate to guess what it will do with mine.

Harry Clton at 21:09 on 8 Jan 2020

Really interesting, useful for me as a junior for understanding the topic.

Piers Hobson at 08:51 on 9 Jan 2020

Thank you for this super talk. Great high level theory followed with practical advice.

There were a couple of ideas and really good practical pieces of advice, which could perhaps have been emphasised on the slides, but weren't, but I appreciate there was a lot of information to convey.

Slides were good, and code samples nice and readable from where I was sat.

Thanks again.