A 7.8 magnitude earthquake in the Philippines has resulted in at least 31 fatalities, with significant damage reported.