phpx, a function library used by SmartPill and SmartCloud