improved php snippets