I have overstayed my visit to the Philippines by two years. After paying the fines, can I stay in the Philippines as long as I have a valid visa?
You are mistaken. You could be in serious trouble. See
Overstaying Foreigners in the Philippines
Foreigners who have overstayed for more than twelve (12) months regardless if their stay is within the maximum allowable period or those found to be overstaying by virtue to a complaint or Mission Order regardless of the period shall be referred for deportation.
You could also be blacklisted per the law. A two year overstay on a visitors visa virtually everywhere in the world will be considered harshly.That indicates a blatant disregard for the immigration rules.