Some php helper functions for daily use