Updated php snippets