Re-adding @giorgiosironi's PHP snippets