Myanmar's parliament has approved a law imposing the death penalty for severe online scam offences, including those involving violence and torture.