Php Utility Functions