/**
* @param $phone
* @return bool|null|string|string[]
*/
public static function getPhoneHref($phone)
{
if (!$phone) {
return false;
}
if (strpos($phone, ',') !== false) {
$arStr = explode(',', $phone);
if ($arStr[0]) {
$phone = $arStr[0];
}
}
$patterns = array(
'#^8#',
'#\s|\(|\)|\-#'
);
$replace = array ('+7', '');
$phone = preg_replace($patterns, $replace, $phone);
return $phone;
}