A consultation has been launched into the phase-out of petrol and diesel cars by 2030.