PHP ClassesHow to Create a PHP Utilities Framework (25.11.2015, 06:36 UTC)
By Nadir Latif
When you talk about Web frameworks, many developers think about MVC frameworks. However, most Web applications need also libraries of common utility packages for general purposes unrelated with MVC.

Read this article to learn how to build a PHP utilities framework to address general PHP application needs that you can use or take ideas to build your own general purpose framework.
PHP ClassesImproving Your PHP Application Deployment with Docker Part 1: Setting Up Docker (24.11.2015, 07:02 UTC)
By Grigori Kochanov
Docker is a sensational tool for building containers for applications with any tools that you need like PHP, MySQL, Nginx, or whatever else you need, with much greater efficiency of resources like CPU, RAM, etc..

Read this article to learn more about Docker and how you can set it up to run your PHP application development or production environment.
thePHP.ccProfessional Object-Oriented Development (24.11.2015, 07:00 UTC)
Cal Evans (Voices of the ElePHPant) Interview with Sebastian Bergmann (24.11.2015, 05:00 UTC) Link
SitePoint PHPBuilding a Basic Video Search App with Vimeo’s API and Slim (23.11.2015, 17:00 UTC)

In this tutorial, you’ll get to know the basics of the Vimeo API. With it, you can fetch information on a specific user or get information on the videos uploaded by the user. If the video is private, you can only get it from the API if the user has given permission to your app.

Vimeo Logo

Creating a New App

The first thing you’re going to need is a Vimeo account. Once you have one, go to and click on My Apps. This will list out all the apps that you’ve created. Since it’s your first time, it should be empty. Click the create a new app button to start creating a new app. Enter the name, description, URL and callback URL of the app. For the URL and callback URL you can enter a URL on your development machine (like

vimeo new app

Click on the create app button once you’re done adding the details. You will be redirected to the app page where you can click the ‘authentication’ tab to reveal the tokens which you can use to interact with the API. We’ll need those later.

API Playground

Before you move on to coding a demo app, take a look at the API Playground. This is a tool provided by Vimeo so developers can play around with the API without having to code anything. It allows you to make calls to specific API endpoints, set custom values for the parameters that can be passed through those endpoints and see the actual result which is a JSON string.

Check the ‘Authenticate this call as {your user name}’ checkbox so that all API calls are performed on behalf of your Vimeo account. If you do not check this box, the API calls will be performed as an unauthenticated request. This means that it won’t be using your app credentials, nor a specific user to perform requests to the API. In effect, it’s then limited to only accessing publicly available information.

Going back to the API Playground, select the application which you’ve created earlier. You can click the make call button to perform the request. The default URL used in the playground is which just lists out all the endpoints which are available from the API. To change this, you can click on the (Empty…) link on the left side of the screen. From there, you can select the endpoint to which you want to send a request. You can try the users endpoint for starters. Once selected, it allows you to input the ID of a specific user and search for users by specifying a set of parameters.

api playground users

Continue reading %Building a Basic Video Search App with Vimeo’s API and Slim%

Cal Evans (Voices of the ElePHPant) Periscope – Sebastian Bergmann (23.11.2015, 15:27 UTC)

At PHP World 2015, we ran an experiment, we “Periscoped” all of our recordings. The audio recordings will still be released as part of the feed, however, the video will be posted here for archival purposes.

Show Notes

Thanks to our sponsor PHPArchitect


The post Periscope – Sebastian Bergmann appeared first on Voices of the ElePHPant.

Jordi BoggianoPHP Versions Stats - 2015 Edition (23.11.2015, 12:09 UTC)

It's that time of the year again, where I figure it's time to update my yearly data on PHP version usage. Last year's post showed 5.5 as the main winner and 5.3 declining rapidly. Let's see what 2015 brought.

A quick note on methodology, because all these stats are imperfect as they just sample some subset of the PHP user base. I look in the logs of the last 28 days for GET /packages.json which represents a composer update done by someone. Composer sends the PHP version it is running with in its User-Agent header, so I can use that to see which PHP versions people are using Composer with. Of course this data set is probably biased towards development machines and CI servers and as such it should also be taken with a grain of salt.

PHP usage statistics

I have two datasets, from November 2014 and today, which shows the progression of various versions. Any version below 3% usage has been removed to keep things readable.

November 2014

All versions Grouped Total 11556916   100.00% Total 11556916   100.00% PHP 5.5.9 2475970 21.42% PHP 5.5 5647892 48.87% PHP 5.4.4 1022498 8.85% PHP 5.4 3305929 28.61% PHP 5.5.17 678997 5.88% PHP 5.3 1716653 14.85% PHP 5.5.16 529227 4.58% PHP 5.6 886260 7.67% PHP 5.3.3 509101 4.41% PHP 5.3.10 479750 4.15% PHP 5.6.0 391633 3.39%

November 2015

All versions Grouped Total 14539303   100.00% Total 14539303   100.00% PHP 5.5.9 4307667 29.63% PHP 5.5 7368033 50.68% PHP 5.6.14 818735 5.63% PHP 5.6 3211919 22.09% PHP 5.3.3 669327 4.60% PHP 5.4 2305984 15.86% PHP 5.4.45 573003 3.94% PHP 5.3 1439061 9.90% PHP 5.6.13 492995 3.39% PHP 7.0 169411 1.17%

And here are pretty pies thanks to Ashley Hindle

A few observations: 5.3 lost 5% which is good but now I guess we are on a long tail decline of Ubuntu 12.04 machines, plus a lot of libs still test against it on Travis which might bias the numbers a bit. 5.5 is still the major platform with a stable 50%, and 5.6 adoption gained 15% that were lost by 5.4. We also see 7.0 appearing slowly, mostly I assume from travis builds again.

PHP requirements in Packages

The second dataset is which versions are required by all the PHP packages present on packagist. I only check the require statement in their current master version to see what the latest is.

PHP Requirements - Current Master - November 2015 (+/- diff from November 2014)

5.2 1367 2.78% (-0.8%) 5.3 25376 51.69% (-16.17%) 5.4 16418 33.45% (+7.04%) 5.5 5002 10.19% (+8.18%) 5.6 826 1.68% (+1.54%) 7.0 99 0.2% (+0.2%)

A few observations: 5.3 lost quite a bit of ground but it seems to go to both 5.4 and 5.5. Given that 5.4 usage is going down quite a bit I think it's safe to go from 5.3 to 5.5 directly if you are going to bump the version requirement, or I'd even argue for 5.6 as it's usage is going up quite strongly and Ubuntu 16.04 should help that as well.

I think php 7 should be required more as well as it comes with quite a few nifty features, I would say it is a good target for a new major version of any lib, but more on that in another post.

Thijs FerynIn interview in the Nevada desert with ContinuousPHP: tech & community in Luxembourg (23.11.2015, 11:59 UTC)

I did a fair number of interviews while I was at Zendcon in Las Vegas. The entertainment capital of the world

The post In interview in the Nevada desert with ContinuousPHP: tech & community in Luxembourg appeared first on Thijs Feryn's blog.

PHP ClassesSmoothly Migrate your PHP Code using the Old MySQL extension to MySQLi (23.11.2015, 03:07 UTC)
By Dave Smith
Have you been putting off migrating you code from the old MySQL extension to the supported MySQLi extension? Is it one of those things that you just are not sure where to start or are you having trouble finding the time?

Read this article to avoid having your code instantly labeled legacy code and learn how to quickly migrate to use the MySQLi extension. It is not going to be as difficult as you may think.
SitePoint PHPPHP vs Ruby – Let’s All Just Get Along (20.11.2015, 17:00 UTC)

Quite often you see developers who have a lot of experience in one language try to play with another, then make a rather quick comparison between the two. This comparison is usually quite worthless, but the clickbait titles get them a lot of traffic.

Instead of doing that, I thought it would be interesting to have a slightly more fair comparison, from the perspective of someone who really enjoys writing both PHP and Ruby, and has done so for years. The aim here is not to find out which is “better”, but to point out a few key things I like about Ruby and its ecosystem.

Elephpant Ruby

Conceptual differences

Different languages are often compared to find out which is better, when the differences that make them up are more ideological. Sometimes one thing seems better to one group of people, when that very same thing makes the language a nightmare for other developers.

With this in mind, before I get into the “bits of Ruby I like in comparison” I think explaining a few of these conceptual differences will be important.

Method, Variable, Property?

PHP offers different syntax to access properties, methods or variables. Ruby does not.


$this->turtle   # Instance Property
$this->bike()   # Method
$apple          # Variable


@turtle         # Instance Property
turtle          # "Instance Property" using attr_reader: :turtle
bike            # Method
apple           # Variable

Pedants will point out here that attr_reader :turtle will define a method dynamically, which is used as a getter for @turtle, making turtle and bike the same thing. A PHP developer looking at usage of turtle with no method or variable name explicitly defined will be incredibly confused about where it’s coming from.

Continue reading %PHP vs Ruby – Let’s All Just Get Along%

LinksRSS 0.92   RDF 1.
Atom Feed   100% Popoon
PHP5 powered   PEAR
ButtonsPlanet PHP   Planet PHP
Planet PHP