Common php helper functions, to be used across multiple projects