Subscribe! Enter your email address below:

NO SPAM: We absolutely hate spam. We will not share, rent, or give away your email address to anyone.You can unsubscribe at any time. Easily!

July 25, 2013

Protect PHP with SourceGuardian
Hi there

Another week and another hot one in the UK this week. It's so rare that we need to enjoy it whilst it's here! We've still been able to gather some juicy content from the past week which we have here in your regular hit of PHP links :)

Please help us to keep growing and tell all of your friends and colleagues.

All the best,



PHP exploding on Google App Engine: ‘It’s amazing, and we didn’t anticipate this’
Venturebeat chatted with Google’s product manager for App Engine, Andrew Jessup, about PHP, App Engine, and Google’s cloud ambitions.

Google Finally Acknowledges that PHP Exists
In response to the article about how PHP is exploding on Google App Engine, Kevin Shroeder asks "How is it that one of the most despised programming languages in the word is running (as Google claims) up to 75% of the web? Many nay-sayers will say “oh it’s just WordPress” or “oh, it’s just PHPbb”.  But in doing that they are completely missing the point".

PHP 5.5 About To Be Stabilised
PHP 5.3 is about to be removed. Upstream has declared 5.3 EOL to be one year after the 5.5 release, meaning around end of June 2014. PHP 5.3 has already entered security-only mode, meaning there will be very few upcoming releases for this slot.

PHP Interview With Corey Ballou
Talking with Corey Ballou, co-organiser of the Queen City PHP meetup group. @cballou has also been working as a developer with the cool mojoLive team.

Ode To PHP
Pay homage to a language that is 18 years mature

5 Rockin' Tips for Scaling PHP to 30,000 Concurrent Users Per Server
Jonathan Block, CTO at, a crowd funding company, has written a nice set of tips for smaller sites on how to scale a service on EC2 using a small two person development team.

Tutorials and Talks

Why Does Expression Web 4 Want to Modify My PHP.INI File?
One of the great features about Expression Web was that it contained support for local PHP development before WebMatrix and IIS Express had entered the picture, and it was pretty easy to configure; all that you needed to do was enter the path to your PHP executable in the Expression Web's Application Options, which you will find under Expression Web's Tools menu.

Lesser-Known "Features" of PHP's OO Model
The vast majority of today’s applications written in PHP are object-oriented and in general the core OOP concepts are pretty well understood by PHP developers. This article pushes the boundary of your understanding and shows you some tricks, or potential pitfalls depending on your perspective, of OOP in PHP.

Following Redirects With Curl in PHP
Evert Pot writes - As a good web citizen, I try to always follow redirects. Not just in my browser, where I actually don't have all that much control over things, but also a consumer of web services. When doing requests with CURL, redirects are not followed by default.

Using Charles To Debug PHP SOAP
Lorna Jane Mitchell used this trick to solve a particularly sticky problem last week. She had a 3rd party SOAP service (except it was actually a .NET WCF service, which is almost SOAP but not quite) which didn't behave in accordance with the way its documentation said it would. PHP's SoapClient has the ability to enable tracing and give information about the request/response headers/body, which is useful, but she needed to store the outputs and also rewrite a particular request header during the course of debugging this.

Data Structures for PHP Devs: Heaps 
In past articles I’ve introduced you to three basic data structures: stack, queue, and tree. In this article I’ll introduce you to another abstract data type that is closely related: heap. Heaps are specialised tree-like data structures which satisfy the heap property – the node value (key) of any parent is always ordered with respect to its child node values across the entire tree. Let’s take a closer look.

Using PHP's Built-In Web Server in Your Test Suites
As of PHP-5.4.0 the CLI SAPI provides a built-in web server. The web server is designed for development purposes, and serves requests sequentially. This web server can come in really handy when the need for an httpd arises during (integration) tests. In this post I’ll use PHPUnit as the testing framework, and I’ll show you how to start the web server during the bootstrap process, and how to shut it down when the test suite is finished.

PHP and Async Requests With File Based Sessions
We recently ran into an issue where several of our ajax requests were taking an inordinate amount of time to execute. Digging a little deeper into the queries being executed, I was expecting return times in the order of 200ms, not the several seconds I was seeing. Installing XHGui only furthered my confusion: session_start() was the culprit with incredibly high run times.

PHP: Perform HTTP requests in parallel
Ever had to request multiple HTTP-resources in your web application? Often, you need data from one request to be able to request the second – in this case there is little you can do but wait for the first to return. However, if the requests are not dependent on each other, you can use a pretty cool trick: curl_multi_*.

PHP Test Doubles Patterns with Prophecy
Test doubles are a way of replacing all classes in our tests other than the one we are testing. They give us control on direct and indirect outputs that would have been generated by those classes. Understanding the role of the test double helps us to write better tests, and thus better code. If we manage to isolate the "collaborators" (the other objects involved in our test) using doubles and test our objects in isolation, then we have achieved modularity: our code is decoupled and the communication between objects is documented by our tests.

Server-Side Device Detection With Browscap
Ensuring that websites can adapt to multiple devices – particularly mobile devices – has become both increasingly important and complex. The variety of ways in which people browse the web has mushroomed. Much of this has been driven by the rise in the use of mobile devices to access the web, although it also applies to devices such as tablets, Internet TV, and so on.

Internationalisation How-To for the 5 Most Popular PHP Frameworks
As discussed in the previous articles on PHP internationalisation, PHP provides native support for string translation using gettext and PHP arrays. These can be used in any PHP project. Additionally, some popular PHP frameworks offer their own way of string translation. In this article, I want to provide a brief summary of the internationalisation process with five of the most popular PHP frameworks currently out there. In this How-To you will read about using CodeIgniter, CakePHP, Zend, Yii and Symphony.

Passing HP Variables to Javascript
I was recently working on a project in CodeIgniter and I was setting numeric variables with constants for things like locations (1 = Maine, 2 = New Hampshire, etc.). This all worked fine but when it came to doing some JavaScript AJAX work I didn’t have access to these constants. One of the advantages of using these constants is that I did not want to have to change the value in more than one place if a value changed or I wanted to add a new location, for example. My way to solve this was to pass my PHP variables through to JavaScript using json_encode.
News and Announcements

Google App Engine 1.8.2 Release Boosts Creation of Large Scale Applications
The Google App Engine team has been having a solid year with regular releases of enterprise grade features across regular monthly releases. The latest version 1.8.2 is squarely targeted at large scale application creation, better tooling support in Eclipse and updates to Python and PHP Runtimes

PHP 5.5.1 Released
The PHP development team announces the immediate availability of PHP 5.5.1. About 20 bugs were fixed including a security fix in the XML parser (Bug #65236).

Ski PHP 2014
For those who like to do more than just code, we're pleased to announce Ski PHP 2014, which will be held on January 17th and 18th 2014 in the U.S. This is a 3-day weekend, so attendees will be able to enjoy the skiing, snowboarding, snowmobiling and other activities that Utah has to offer after the conclusion of the conference.

Pavel Durov and his colleagues have developed an improved version of PHP
Pavel Durov, the founder of "Vkontakte", last night presented the new compiled programming language that they developed two years.  According to the author, at the end of May, at the height of site traffic 50 million people had completed the transfer of all the code "Vkontakte" to the new language.  As a result, almost all the pages have to be loaded in half the time.

Nomad PHP July 25th 2013 8pm EDT
The PHP virtual user group, for people who don't have a group nearby. Special guest presenter Corey Ballou talks Creating Realtime Applications with PHP and Websockets.

Reading and Viewing

The Development Hell Podcast - Episode #34 - Is Sara Pissed?
This time out our Very Special Guest is Sara Goleman, long-time PHP core contributor, author of the only good book on writing extensions for PHP and the driving force behind that open source project of HipHop for PHP, a virtual machine, runtime and Just-In-Time compiler for PHP that powers much of Facebook’s infrastructure.

Mastering the SPL Library: a php[architect] guide (by Joshua Thijssen, published 19th July 2013)
The Standard PHP Library is already a few years old, but recently the library has gained a lot of popularity among PHP developers. With more complex applications and more data to process, the library’s many functionalities can make development more efficient and easy. However, one of the major problems of the SPL is the fact that the documentation falls behind the rest of the PHP documentation. This book covers all the facets of the library and gives you some background information where needed. Everything is accompanied with examples to give you an idea on how to use it in practice.


If you have a position that needs filling, let us know and we will include it.

Performance Telecom (UK) seek freelancer (Remote worker) - Python and PHP Developer
This position is primarily Python, but PHP skills are also required.

Senior PHP Developer in Bucharest, Romania
We are searching for a passionate PHP developer who will be part of a team of senior programmers and experienced testing engineers, directly involved in technical development projects, using Agile Scrum as methodology.

Interesting Projects, Tools and Libraries

A simple event management library for PHP 5.4.

Yet another missing PHP library... about Content Negotiation. Negotiation is a standalone library without any dependencies that allows you to implement content negotiation in your application, whatever framework you use.

Using 3rd Party Libraries in Composer Projects
Recently, Cal Evans discussed a lesson he learned about “Managing the Verbosity of Symfony’s Command Object With a Trait” while building a project. This particular project has been very instructional to him so here he is sharing something else he learned.

A PHP5 library that allows you to generate shortened URL through famous API like bitly. Reverse is also possible.

Symfony2 bundle for Ladybug library (Simple and Extensible PHP Dumper). This bundle provides an easy and extensible var_dump/print_r replacement for Symfony2 projects, both in controllers or Twig templates.

Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs. Slim is easy to use for both beginners and professionals. Slim favors cleanliness over terseness and common cases over edge cases. It's interface is simple, intuitive, and extensively documented — both online and in the code itself.

A PHP namespace validator written in PHP. Type verification for PHP source, ensures uses and all types within a file verify against the projects auto loader. 

A simple GUI to set up virtual machines for PHP development. You can create your box on your local machine (default behaviour) or create a new instance on a few hosting providers.

Criterion: A PHP CI Server
This week the Romhut team released an open source project that has been aggressively developed over the last few weeks. It started as a personal tool to test our many private repositories in a controlled environment but quickly evolved into a fully fledged, generic open source continuous integration server. Thanks to hours of discussion and endless commits (mainly from @scottymeuk), Criterion was born.

A PHP framework for the Sauce Labs REST API. Your one-stop shop for everything Selenium + Sauce Labs + PHP. This is a set of classes and libraries that make it easy to run your Selenium tests, either locally or on Sauce Labs. You run the tests with PHPUnit.

Inspired by Ruby's Capistrano, Grunt is a PHP library for executing commands in parallel on multiple remote machines, via SSH. Specifically, this library was written to simplify and automate deployment of PHP applications to distributed environments.

Lightweight, fast, flexible PHP templating system. Jig - "A device that holds a piece of machine work and guides the tools operating on it." Or to put it another way, a jig allows you to work fast with sharp tools without cutting your fingers off.

A fully-tested PHP JSON-RPC client library for Transmission

A fast template engine for PHP

PHP Markdown Lib
It’s time for PHP Markdown to become a mature well-packaged PHP library instead of a hybrid file that tries to be everything for everyone.

Find Us, Follow Us, Promote Us :)

Show the love

Please let people know about us via Twitter, Facebook or any other social media. If you're involved in another PHP group or forum please pass on our newsletter.

Subscribe! Enter your email address below:

NO SPAM: We absolutely hate spam. We will not share, rent, or give away your email address to anyone.You can unsubscribe at any time. Easily!

Talk to us!

If you have some news, want to share a link with us or chat with us feel free to email us.

And we also have an RSS feed that you can use.

Like us on FacebookFollow us on Twitter

Copyright ©