Archive for the ‘PHP Syntax’ Category

PHP - ‘allowed memory size’ fatal error whilst using exec() command

Friday, October 7th, 2011

I was using php 5.3’s exec() command within a cli script to load some data …

Gotcha - Php require_once includes files twice if path’s case is wrong causing ‘Fatal error: Cannot redeclare’ errors

Monday, September 12th, 2011

Here’s another gotcha story. Its a little storm in a teacup that occurred while I was writing …

Gotcha - Fatal error: Call to undefined method stdClass::myMethod() in /myscript.php on line

Monday, August 8th, 2011

I had a bit of confusion trying to debug a relatively complex set of classes that …

PHP Inheritance of a class property’s visibility

Friday, September 3rd, 2010

In Object-Oriented PHP5 a class’s properties can have their ‘visibility‘ set.

If a property is undeclared …

PHP Static Methods Can Be Declared Without Static Keyword But Called Statically

Friday, September 3rd, 2010

Whenever I create a PHP class method that I intend to use statically, I declare it as …

Zend Config XML and INI files - How to Specify False and Other Non-String PHP Data Types

Friday, August 27th, 2010

Zend Config INI and Zend Config XML are handy adaptors that allow you …

Simple PHP pretty date time now!

Saturday, July 3rd, 2010

Sometimes I just wanna print a date and time in PHP quickly. I’m forever going off to …

Gotcha: Zend_Validate_StringLength interface changes between versions 1.9 and 1.10

Saturday, April 17th, 2010

Just a little note to myself for when i upgrade to Zend Framework 1.10

The interface to the …

A PHP secret to understanding Data Mapper Pattern in Fowler’s Patterns of Enterprise Application Architecture (PoEAA)

Tuesday, February 9th, 2010

Here’s a snippet of a Java code example in Fowler’s esteemed  book, Patterns of Enterprise Application Architecture …

call for new programming language written with refactoring tools in mind

Sunday, December 20th, 2009

i have just read Fowler’s Refactoring book and went looking for a php refactoring tool. Its …