Had the same problem before. Looking at it again, this probably works with PHP 5.4, but it surely won't with PHP 5.3.