Recover Bitly Bundle Data

For some years I've been creating a bundle of links covering articles I recommend for various topics in the Zend Certified Engineer Exam (if you can here looking for the bundle itself, it's at This was done using bitly's bundles feature, which I thought was a great way to share links. In fact I had 10-15 bundles that I had created from collating all the links in a particular training course or talk, so that people didn't have to try to write down URLs as I went along. Unfortunately they sunset their bundles and then removed them completely, and I missed the announcement (it all happened quite quickly, they'd seen some abuse of the feature, it's free, all totally reasonable) BUT they also didn't respond to my support questions about how to recover the data.

It turns out, it's an undocumented feature on their API, so here is everything I know about recovering your bundle data, including the script I used to rescue my own data. Continue reading

PHP7: Easiest Upgrade Yet

With PHP7 looking increasingly stable (relatively speaking, it's still pre-alpha so it's VERY early days and anything could happen!), and work going well on the GoPHP7-ext project to get extensions converted, I have been thinking about the migration guides we'll need to help people upgrade their existing applications. To this end, I took the simplest project I currently have ( and gave it a whirl on PHP7, using Rasmus' PHP7 dev box. The result:

Continue reading

PHP Quick Stack Trace in Exception Handler

PHP and frameworks built from it have many great tools to assist with debugging (I particularly like XDebug) but sometimes you can find yourself in a situation where the "helper" features aren't all that much help ... in my case this was a framework totally determined to output HTML from my commandline script and to only show me 5 lines of stack trace, which wasn't enough for my complex application. I had to look up how to generate a nice stack trace inside an exception handler so here it is in case I want it again some time (future me, you're welcome!) Continue reading

ZCE Preparation Pack

tl;dr version: the ZCE Preparation Pack is now available from Leanpub costing $30.

I've been running a preparation course for the Zend Certified Engineer exam for many years now.  Once upon a time it was possible to buy a pack of sample exams and I used them myself when preparing for certification and also recommended them for all my students.  Unfortunately this resource became unavailable and so I created a sample exam to use with my own course .... and then (after some nagging!) made it generally available.

I've now relaunched the pack on a new platform (for boring regulatory reasons); its new home is on Leanpub which is a fantastic platform for authors, offering markdown authoring, github integration, and many other awesome features.  Perhaps more importantly, it also offers great features for readers: a 45-day money back guarantee and automatic updates to any book you have bought.

If you're thinking of improving your skills by studying for ZCE or considering upgrading your certification to the current version (PHP 5.5), this pack will help you to prepare.  It includes:
- Advice on what to expect on the day
- One exam's worth (70) of questions in the style of the ZCE
- Answers with explanations, worked examples, and resources for further study

Help yourself get ready for ZCE:

XHGui on VM, Storage on Host

I'm doing some performance tuning on a project at the moment and my favourite tool is still XHGui - but it's designed to run on the same machine as its victim and since this is a vagrant VM, the chances of me destroying the machine and therefore the data are pretty high! Instead, I set it up to store the data onto the host and I thought I'd share how I did that. Continue reading

ZCE Questions Pack Unavailable

There is a change in legislation for selling digital goods to anyone in the EU, and to cut a long story short this means that my ZCE Questions Pack will be unavailable at least in the short term. The pack is intended for anyone preparing for ZCE, it has general advice, sample questions and detailed answers and resources covering all the topics you will encounter at ZCE.

However from January the VAT rules change and I'm not in a position to comply with the new rules (they would cost a lot more than the sales make). I'm looking for alternative sales channels that would enable me to keep making the pack available but those won't be in place immediately. If you are studying for ZCE over the Christmas break, please make sure you have the pack well in advance!

Edit: Pack temporarily unavailable now

I have other (free!) resources for you also on my ZCE page. If you have an earlier version of this pack, email me your receipt and I'll send you a new copy - but again, you have about a week to do it!

How to Choose PHP Hosting

I've been thinking a lot about the state of hosting in PHP lately, mostly as a result of working with a few different clients on their setups (including one that bought brand new hosting a month ago and got a PHP 5.3.3 platform), and also being at DrupalCon and meeting a community who is about to make a big change to their minimum requirements. With that in mind, here are my thoughts and tips on choosing hosting. Continue reading at PHPNW's Hackathon

With a week to go, everyone attending PHPNW is starting to get excited. One of my highlights of the weekend is always the hackathon; as an open source project lead it's fantastic to meet new contributors and get a chance to hack in person with them and the more established people from the project.

This year will be no exception: PHPNW's Hackathon is on the Friday evening - you need a conference ticket, and you need to tick the "hackathon ticket" box. will be there and we've got a very big todo list so if you are looking for something to hack on, then look no further! Continue reading

Compiling PHP Extensions

There are lots of reasons why you might like to compile your own PHP extensions. For me those reasons are usually:

  • The extension isn't available on pecl (e.g. uprofiler)
  • The extension is on pecl, but you need the newest version or a branch with a particular feature or fix in it, perhaps for testing
  • You are fixing an extension yourself (yay, we need more people like you!)

Related: If you followed my previous post on compiling PHP, be aware that in the php/bin/ folder there is a pecl binary that will install extensions correctly for whichever version of PHP it belongs to, so you may not need to read the rest of this post. However if you do, the paths follow on from the examples in that post.

I haven't seen a really approachable guide anywhere, we tend to speak of extensions in hushed tones, and actually it isn't particularly tricky so here is my quick how-to guide. Continue reading

Running Multiple Versions of PHP

When I advise people about upgrading their PHP version, I say things like "just run your test suite with the new version" "just grab the new version and try your site with the built-in webserver". A couple of people recently have asked for more detail on how to actually achieve these things so here's a quick primer on getting new PHP without touching anything to do with your existing PHP installation. Continue reading