fraction math in php