php golf calculation demo