Updated snippets and replaced PHP syntax