Archive for September, 2007

PHP5 Method Chaining

Posted on September 19th, 2007 in PHP | No Comments »

Introduction

In this article, I'll be talking about a useful new feature introduced in PHP5 as part of the OOP improvements over PHP4. This feature is called Method Chaining and enables us to do pretty cool things like:

$object->method_a()->method_b()->method_c();

Read the rest of this entry »

Don’t repeat yourself when using printf!

Posted on September 17th, 2007 in PHP | No Comments »

Hi folks,

We all use printf (or sprintf) to help ourselves when mingling together output strings with our variables, right? This is a tip that I use often, but I continually see people writing code where this technique would be useful but isn't used. What _am_ I on about? Read the rest of this entry »