reformat some of the php snippets