{PHP} Some useful utility functions and classes