Updated the php template generator.