Example 1: $math = new Math; $balance = 12.30; $deposit = 1.70; $total = $math->sum($balance, $deposit); In the sample above, the $total variable will be 14.