Usefull snippets in PHP