PHP: add string, array and datetime functions