Fixing PHP snippets