Category Archives: php
New Screencast Series: Git Fundamentals
Edit: If you’re reading this before July 25th 2015, use code CFSCON5 to get a massive 50% off!
Continue reading
PHP 7 Benchmarks
This graph shows the time it takes for each version of PHP to perform the same task, on average, with oldest PHP on the left and moving forward in time.
PHP 5.4 and Short Tags
One thing in particular is tripping people up: the short open tag. I’ve had a few questions on this so here’s the advice I am giving to clients and friends.
What Actually Changed
The short_open_tag
configuration directive was removed, but the short echo syntax <?=
is always available.
How To Upgrade Your Codebase
- If you have
<?=
in your templates, leave it alone, those will still work - If you have short tags
<?
in your code, including in any of your libraries, then you need to do a global find-and-replace and turn them all into<?php
If you have short tags somewhere in your codebase, you probably won’t get errors, you’ll just suddenly start seeing PHP code in your output as PHP doesn’t recognise the tag and therefore doesn’t evaluate the code! To find them, try searching for <?
followed by a whitespace character.
Hopefully that helps; there are a few gotchas to getting upgraded from older versions (especially from PHP 5.2) but this particular gotcha really isn’t a problem and the instructions here should see you through.
Recover Bitly Bundle 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
Total lines of code change needed to make the @joindin API work on PHP7: zero
— Lorna Mitchell (@lornajane) May 14, 2015
PHP Quick Stack Trace in Exception Handler
ZCE Preparation Pack
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: https://leanpub.com/zce
XHGui on VM, Storage on Host
ZCE Questions Pack Unavailable
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!