= 10) { $nx = 1 + ($ix % 10); $total += $nx; } else { $total += $ix; } } else { $total += $n; } $i++; } $total -= $last_n; $x = 10 - ($total % 10); if ($x == $last_n) { return true; } else { return false; } } public static function getInstance() { if (self::$_instance === null) { self::$_instance = new self(); } return self::$_instance; } }