Php Posts

Open Source Challenge Complete!

For those of you that follow my blog reguarly, a few weeks ago I announced I was undertaking my Open Source Challenge. Today marks the 32nd day of consecutive code pushes, so I successfully completed my goal! I've attached a list of the projects I contributed to for you guys to check out.

StatsD PHP Library

Today, I just created a StatsD PHP Library and released it on Github . Before you start with "but there are already loads..", I do realise this, but they didn't suite my needs. This is a short post to let you know why I opted to create my own, and what I hope to achieve from it.

Why I learned Ruby

For a while now I've been hearing a lot of people taking about the programming language Ruby. Not that it's anything new, it just seems to be a lot more popular in my circle of friends and my Twitter feed. Naturally, as a professional PHP developer, I should hate the idea of Ruby and start some crazy argument about how PHP is far superior and Ruby should die (blah blah etc.. boring). Instead of this approach, I took it upon myself to learn Ruby from the ground up and understand why so many people enjoy using it to power their applications. Too many people argue over things without understanding both points of view, which always annoys me.

Using Cloudflare Page Rules

Today, I decided to explore Cloudflare features in a bit more depth. I currently manage quite a few applications, both personal and business related on the platform. One feature which I'd never really looked into before was Page Rules. I'd read about them, but never actually applied them to any sites. Due to how much of an affect it actually had by applying a few rules, I feel like I should spread the word for anyone who isn't aware of what they are and how amazing they can be when used correctly.

MongoMinify Launched

Today I finally released the beta version of my MongoDB compression library for PHP. There still a lot of work to be done, but it's stable enough to use as a drop replacement for standard usage such as saving and retrieving data. Not only have I released the source code, but I've also submitted it as a composer package on so everyone can include it in their projects very easily.

Awesome Tools I've Been Using

I recently just passed my probation period and got hired full time at Performance Horizon which means I get to work on awesome technology with a great team for the foreseeable future! Over the last 3 months I've met really interesting people, attended conferences and meetups, worked on complex edge cases and compiled quite an inventory of tools I use in my daily work. This post is pretty much a summary of those tools and my opinion on why I think you should give them a try. I've included all the links to the mentioned projects at the bottom of this post.

Installing CURL on Ubuntu with PHP5

This is a quick post explaning how to quickly install the CURL module on PHP5 in preperation for my next few posts. Below is the code to run from the command line. Please make all your packages are up to date and upgraded to the latest version before continuing. This isn't essential, but I always reccomend doing this before installing new software. Now the actual code.

APC (Alternate PHP Cache) Drawback

Today I was experimenting with various caching techniques in PHP and Apache to try to speed up my site, while still keep all of my content real-time and efficient. I will be writing a full post on my experiment and my results later on tonight, but for now I just want to write a quick post about APC.

Convenience vs Performance in PHP

PHP, while known for it's simplicity and scalability, is an overall slow and memory consuming language. I my 5 years of programming, I've managed to build myself a fully custom and highly optimized set of libraries which I use in a lot of my projects. These libraries range from Geo Location and Authentication, to Sessions Handling and Web Crawling. While these libraries are highly optimized, they still don't have the performance I am hoping for from my applications. PHP consumes high amounts of memory, and isn't the fastest language by any means. I've spent the last few months trying out new ways of upgrading my applications to be more powerful and faster, even learning new languages and techniques along the way.

Pagination with PHP and MySQL

This is a quick tutorial on how to code basic pagination using a combination of PHP and MySQL. Pagination is basically splitting a list of content between multiple pages for easier navigation and less scrolling on a website. To start with you are going to need a few variables.

Create Symlinks using PHP

Did you know you can also create symlinks using PHP? Now when you have a lot of files you want to symlink in bulk, such as Apache project files which I described in a previous Blog post, you can simply create a php file to do all the work for you.