Latest Story

Orms and Circular References

May 27, 2010
By SeanJA

In my spare time I have been working on an ORM… not one meant to be used in the real world (well… not yet anyway). I currently have hasOne and hasMany working like so: <?php   /** * @property int $id * @property string $type * @property int $car_id */ class wheelBoilerplate extends orm{...
Read more »

Netbeans 6.9: My New Favourite Features

April 29, 2010
By SeanJA
Netbeans 6.9: My New Favourite Features

Netbeans 6.9 beta was recently released, here are some of the new features for the PHP editor that are pretty awesome. The first one is recognizing overridden methods and classes. This feature is great because it allows for better auto completion, and lets you...
Read more »

Exceptions Are Not For Flow Control

April 21, 2010
By SeanJA

When I saw this post on Better Error Handling, while there is nothing horribly horribly wrong with it I couldn’t help thinking that he has gone past proper error handling. Exceptions are for exceptional cases, hence the name. They should not to be used...
Read more »

PHP Functions, you’re doing it wrong…

April 14, 2010
By SeanJA

Just a quick tip today. If your function looks something like this:   <?php /** * A really long function definition * @param string $has * @param bool $a * @param int $lot * @param float $of * @param assoc_array $parameters * @param string...
Read more »

An alternative to Poor Man’s MVC in PHP

April 7, 2010
By SeanJA

As written in my previous post ( http://blog.seanja.com/2010/03/re-top-10-php-techniques-that-will-save-you-time-and-effort/ ) I noted that the code for the proper way to write an index file is essentially a Poor Man’s MVC tm. This method is fine for someone starting out their php journey, it lets them...
Read more »

RE: Top 10 PHP Techniques That Will Save You Time and Effort

March 31, 2010
By SeanJA
RE: Top 10 PHP Techniques That Will Save You Time and Effort

I realise that I already posted something today, but this seemed like an emergency… I thought maybe this was a serious post when I clicked on it, then when I got to number 2 on the list (I had skipped reading his post about...
Read more »

PHP DateTime is missing methods in 5.2

March 31, 2010
By SeanJA

It turns out that in PHP 5.2, the DateTime class is missing a couple of methods (get/setTimestamp) that are available in PHP 5.3. These are some strange methods to be missing as a lot of people in the PHP world seem to work on...
Read more »