A 7.8-magnitude has shaken the southern Philippines and parts of Indonesia, killing at least 35 people.