Software patterns using php