Library of functions for php