Some spare parts for PHP apps