Improve php snippets