It might work. It should take into account the occurrence of spaces anywhere in the telephone number.
preg_match('|^\s*\(?\s*\d{1,4}\s*\)?\s*[\d\s]{5,10}\s*$|', $phone);
2 .
:, , :
if (preg_match('|^\s*(\(?\s*\d{1,4}\s*\)?\s*[\d\s]{5,10})\s*$|', $phone, $m))
{
echo $m[1];
}