Phil Sturgeon

PHP

Composer with CodeIgniter

Composer is the best thing for PHP since sliced arrays and using it in your applications means you have easy access to a large selection of well written PHP packages that plug and play with any framework that supports PSR-0 namespacing. This is BRILLIANT as it means less reliablity on the framework and framework-specific code, and helps you get towards the goal of portable code where the framework is essentially just the wrapper. FuelPHP will support Composer packages out of the box as does Symfony2 and I hear Drupal are working it in too. This interoperability is brilliant, but how do you use it with CodeIgniter?

CMS: Interesting History, Powerful Future

As a CMS developer on the PyroCMS team, a common problem I have to deal with on an almost daily basis is peoples strange fear of using a CMS as a base for a project. People often suggest the tools of my trade are not appropriate, are only for "small sites" or should not be used as a base for an application. I know there are plenty of awful content management systems around, but I propose a few rules for CMS developers to follow so we can shirk this dark cloud that hangs over us.

Hijacking Headers to Force Downloads

A while back I asked a tricky question on Twitter and got a whole bunch of really useless answers, except for one - which was a pure stroke of genius. At the time I was just happy to have the goal met on the client project and I tucked the snippet away, but I needed it once again so I thought I'd blog it up, for others to use it in the future: How to force a download of any file you want to link to, anywhere on the internet.

Packages: The Way Forward for PHP

A package is a piece of reusable code that can be dropped into any application and be used without any tinkering to add functionality to that code. You don't need to know what is happening inside, only what the API for the class(es) are so that you can archive your goal. This is how most modern programming languages work, but to make a generalisation: PHP developers hate packages. Why?

2012: The year of PHP cloud hosting

Cloud hosting is nothing new. Seeing as "cloud" is such a loosely used term some will consider their VPS solutions on Slicehost or Rackspace to be "cloud hosting". Thats partially true, but this article covers how PHP is getting some serious attention in the PaaS (Platform as a Service) field. This year you will almost certainly find yourself making the decision wether or not to move some of your applications and services accross to the cloud, and this article can hopefully help you work out why and how.

PHP Basher Bashing

Anyone who has used PHP for a while knows that it has its ugly parts. Recently I've seen a whole swathe of PHP-bashing articles and that would be fine if they were making a valid point, but some of it has just been - as I tweeted recently - "absolute drivel". He didn't like that very much so I thought I'd follow his follow-up with an article of my own.

Time for a Change

After years of being an active member in the CodeIgniter community I have decided it is time to change things up and move on. Where is that move taking me? Recently I have been doing a lot of research into various frameworks and I have made a final decision. Read on to find out what framework I decided to go with and why.

PHP Format abstraction with a simple class

Having a quiet night in before a long day of kayaking I thought I'd write some fun code instead of banging out the usual shit like I've been doing all day. Convert between Array, Object, JSON, XML, CSV and Serialized data and back again easily. I'll add a few more types like YAML when I can be arsed to work out PECL for MAMP.

Power dump() on your PHP applications

Application development going a bit slowly? Take a power dump() and get right back on track. This handy little PHP function will output the what, why, when, where of your variables and help you get back on track.

Tiny REST framework in PHP

Based on Twiny framework and my CodeIgniter REST server I have created a really simple RESTful framework that lets you use CodeIgniter style controllers without any of the extra weight of using a whole framework. It lets you handle GET, POST, PUT, DELETE requests with ease and return data in XML, JSON, HTML tables, Serialize, PHP syntax and CSV.

twiDAQ

Join the awesome twiDAQ game and invest in people you think are interesting. Invest in me:

Otherwise you can try investing in Jimbo:

He probably rigged it for him to win anyway.