First Commit. umdhmm ported to php