[snippets] Make PHP snippets more standard

https://bugzilla.gnome.org/show_bug.cgi?id=629774