Six of Flow’s developers were privileged to attend the PHP Craft conference on 4 and 5 April at the Sci-Bono Discovery Centre in Newtown, Johannesburg.
We got to hear from some of PHP’s eminent international practitioners (cue: Phil Sturgeon), as well as some local talent (including our very own Zander Janse van Rensburg and Flow alumnus Danny Kopping). But the main highlight of the conference was the keynote from Rasmus Lerdorf, the inventor of the PHP language. It was a surreal experience to have the person who sparked the world’s most popular scripting language in the same room as us.
Lerdorf spoke about the genesis of PHP, as well as taking us through some of the plans for its future. Here’s what I learned from him:
1. Building an ecosystem
Lerdorf explained that instead of focusing on being 100% syntactically correct, he focused on the ecosystem within which the language would sit. This included things like ensuring PHP would work well on shared hosting environments and that it integrated well with existing web servers and database systems. The ecosystem is what made PHP successful, not the language itself.
2. I code for me, I don’t code for you
Many participants asked if “there were plans” for certain features in PHP. Lerdorf was clear that the PHP core team were building features that solved problems for them, not for the community. This is one of open source’s greatest strengths and weaknesses – developers give up their free time on the stuff they want to work on, but you only get what they want to work on. I admired his honesty.
3. Frameworks lead to bloat
I asked Lerdorf if he still hated all frameworks – he still does. Lerdorf believes that generalised frameworks lead to bloat – having to cater for too many use cases means unnecessary complexity. He recommends that you consider your toolset when developing simple solutions – they may not require a fullstack Zend or Symfony implementation.
4. Needle, haystack or haystack, needle
I’ve always wondered why PHP is inconsistent with the way some functions take arguments. Sometimes you pass in the haystack first, and then the needle. And sometimes you need to pass the arguments in the reverse order (needle, haystack). Well, there is consistency in the inconsistency – it turns out all string functions use haystack, needle (e.g. strstr()) and all array functions use needle, haystack (e.g. in_array()). That should be easy to remember!
5. Lerdorf is a cool guy
I expected Lerdorf to deliver his keynote address and disappear into Johannesburg straight afterwards, but he attended every talk and socialised afterwards with the attendees on both days. He even pulled out his laptop to “school” a couple of attendees on output buffering. He must have heard the same questions and comments a thousand times, but he was gracious and freely gave of his time.