Some useful php fuctions/util