Common PHP utilities