The annual PHPNW conference, now in it’s 7th year, was held on the 4th and 5th of October in Manchester, again in the Mancester Conference Centre. The conference was attended by over 400 people with over 30 speakers from all over the world who talked about everything from project management to the internals of PHP. I have been volunteering at PHPNW for a few years now, but this year I was able to attend as a delegate with a number of colleagues from Access. It’s been a few weeks since the event, but I haven’t had a chance to publish this review, so here it is.
After a quick introduction from Jeremy Coates we got started with the keynote talk How PHP Changed the World of Programming with Anthony Ferrara. Anthony started out with some facts about PHP, like the fact that PHP runs 82% of the internet. It was also interesting to note that PHP is 20 years old next year, which actually predates the HTTP standard. The main theme of the talk was all about how to maintain a healthy ecosystem with such a large community. PHP has a lot of people who are passionate about the technology, but it also has a lot of trolls. It’s important to understand the difference and embrace the people who are passionate and not feed the trolls.
The last major change in PHP that had a lot of backwards compatibility issues was with PHP5. Getting the PHP community to adopt PHP5 was a bit of a struggle at first with only a few hosts willing (or able) to support it, even after many months of it being available. It was only through the GoPHP5 campaign that support started to grow. The GoPHP5 campaign was a collaboration by multiple CMS and systems creators that made the decision to build the next version of their system specifically for PHP5. After the community started to do this hosts started to take notice and support for PHP5 increased rapidly. This was an example of the PHP community grouping together to effect change on a worldwide scale. This change is still going on today with tools like Composer (which started a component revolution) and initiatives like PSR that help to standardise things and allow interoperability between PHP platforms.
Anthony also said that one of the worst things to happen to a community is to have it fork into two different projects. He did say that this doesn’t always have a detrimental effect as projects like Joomla!, Jenkins, and Libre Office have all come from projects that have split from their original projects and become better for it.
Whilst talking about projects changing Anthony talked about how Drupal 8 has mainly rewritten most of it’s code using components from Symfony and a few other projects. What is important is that Drupal developers have been going to Symfony conferences and visa-versa, causing a cross collaboration of communities. The collaboration has meant that skills and code have been submitted back into Symfony from Drupal developers. Much of my time developing is spent using Drupal and I have been watching the developments in Drupal 8 with much interest, so to see it praised in this way both in terms of community and technology was nice.
There was also a small amount of controversy during the talk. Whilst talking about community and prominent technologies in use on the internet Anthony put up a slide containing the word ‘WordPress’, which caused a little laugh to spread through the crowd. I didn’t think anything about it at the time, but the problem was that there were a few of WordPress developers in the crowd that were disappointed in the response. I can fully understand why they were disappointed as any system that you devote time to can become a loved favourite. It was a shame that anyone was made to feel unwelcome at a PHPNW conference, but by the end of the conference they were definitely made to feel welcome. The WordPress developers in attendance were even given speaking opportunities at other events and meetups.
Next up was Rob Allen, who talked about a tool called Apigility. This is a tool that allows you to create an API without having to write a lot of boilerplate code to handle requests and formats. Getting all of the ancillary details correct in an API can be difficult and Apigility is intended to make this process easier.
After a quick coffee break I went to see Composer for Corporate Use with Stephan Hochdörfer. This was a tour of a few strategies regarding using Composer in a team of developers including how to build your own packages, what tools are available for this and how to test them. Stephan is clearly knowledgable about this subject and this knowledge is gained from experience of doing these tasks on a day-to-day basis.
After lunch, which was provided by the Manchester Conference Centre (and was quite tasty), and a little rest, I went into Debugging: Past, Present and Future with Derick Rethans. This was a tour through some of the front end pretty printing tools, onto live debugging using Xdebug and onto some new features that are coming in the next version of Xdebug. Derick took us through a tool he is developing called Vld that shows all of the possible execution paths that are available in a function. This means that when doing test driven development the code coverage will be a more realistic as it shows all possible execution paths, rather than just executed code.
What was really interesting about the talk was some of the future plans for Xdebug, which included the ability to go back and forward through the code execution. This is facilitated by doing a full trace of an application into a file and then feeding that into the IDE in order to allow the code to be run backward and forward in order to see how the code runs.
Next up was Web Frontend, API Backend, presented by Lorna Mitchell, which looked at the technique of creating an API layer and then building a web front end and works by calling this API backend. I had heard about this practice once or twice over the years, but was interested to see how it performed in a professional environment. Building a website like this does add a little complexity, but the returns are worth it. The main bonus is from scalability as multiple frontend web nodes can be plugged into the same backend, which allows for the frontend to be scaled easily. The backend can also be used to build other things like mobile apps and other API related tools. It’s important that the API be built as a fully fledged API with the correct headers and with an authentication system as this makes things easier in the long run.
Another quick coffee break before going to see Pablo Godel talk about The Modern Developer Toolbox. Pablo spent the first 10 minutes or so talking about how not to do things in an attempt to show what was modern, which seemed a little backward. After looking at local development environments in-a-box like MAMP, he soon got onto useful tools like Vagrant. Pablo also talked about tools like Xdebug and Docker, before going onto some other devops tools like Logstash and statsd. Overall there were some good tools here, but there was too many mentioned and not enough detail about any of them. That said, I’ve got a few interesting tools that I hadn’t heard about that I need lookup.
After the talks had finished for the day it was time to relax at the social event with the awesome free bar. I had come with a few other colleagues from Access (the company I work for) and so our evening was spent chatting with other developers, trying out the photo booth, and having a long discussion about how we could incorporate some of the things we had seen in our day-to-day work.
The first talk on Sunday was PHP: Under The Hood, with Davey Shafik. This was a complex talk for first thing on a Sunday morning, especially after a night of drinking and no sleep, but Davey delivered it very well. He first detailed what he called the performance loop where you benchmark, then profile the application before making changes and then benchmarking again, which is a good way of figuring out where the bottlenecks are and solving them. The most likely cause of slowdowns is simply bad code, so Davey took us on an investigation of a few blocks of code to show how they are parsed and run inside the PHP engine. He used Vulcan logic dumps to show how different parts of the code were parsed and where speed improvements could be made. He did say that making micro-improvements like swapping double quotes for single quotes generally won’t improve the speed of your application, it’s the benchmarking and profiling that should pinpoint where the improvements should be made.
Right after Davey was Michael Heap with Bring Your Application into 2014. This was a session that involved taking a single PHP file that contained database code and HTML and extracted the needed parts into different files to create a much more maintainable system. In this way he showed how to refactor code whilst still making sure that it produces the same output on the front end. This makes sure that the end result still works as expected and that improvements can then be made from that point onwards.
The penultimate talk of the conference was Anthony Ferrara, giving his second talk at PHPNW14, High Performance PHP. This started off as a look at small sections of code in PHP and how they are compiled and run by the internal engine. This was a very detailed analysis of how PHP actually runs code and moved onto a more general look at how compilers work. He then showed how things like the PHP compiler and the HHVM fit into these compiler models before showing a compiler he had been writing called Recki-CT. Anthony showed how using these custom compilers can have performance benefits, but that some code (like closures) are not supported.
The final talk of the conference, and the closing keynote, was Volker Dusch with Your Mileage Should Vary. This was one of the most inspiring talks of the conference and had everyone in the room applauding quite a few times. His main message was that programming wasn’t just about code, it was about the people involved.
PHNW14 was as good as ever, and not being involved with the organisation of the conference this year meant that I could relax and mingle a little more than usual. I went with a few people from Access and they all said it was an amazing conference and that they all learned a lot. Each year I tend to see a theme developing at PHPNW, so whereas last year it was all about virtualisation and Vagrant this year it was all about community. Having all of these platforms, systems and tools is good, but it is the community that surrounds each one that really gives worth to the system. Being a Drupal developer I have seen this community spirit first hand, so it is good to see the whole of the PHP world do the same. The PHP community is really a community of developers working on platforms like WordPress, Magento, Drupal, and Synfony, all of which can support each other.
Some random thoughts:
- There is always so much to learn about.
- I need to attend more unconference talks.
- Mike Bell is one of the bravest people I know.
- Perfect is the enemy of better.
- Community counts.
- Programming is about people.
- Rob Allen takes some amazing photos, some of which I have used here (have a look at his Flickr account).
A massive thanks to everyone behind the scenes at PHPNW and all of the sponsors who made it happen. I know a few people who will definitely be going again next year. See you at PHPNW15!