A small set of PHP helper functions