How to remove non utf-8 characters from string in php

preg_replace('/[^(\x20-\x7F)]*/','', $string);