Miscellaneous functions for the php developer