edited php snippets