PHP function to calculate the sum of the hand in blackjack.