PHP functions for various common tasks.