The Philippines has ordered an estimated 20,000 foreigners working in mostly Chinese-owned offshore gambling firms to leave the country within 60 days following a ban on the operations, which have been linked to human trafficking and scams.