<?php
$text = '89114001234';
$regexp1 = '/^8[0-9]{10}$/';
$regexp2 = '/^8[(]([0-9]{3})[)][-]([0-9]{3})[ ]([0-9]{2})[ ]([0-9]{2})$/';
$regexp3 = '/^8[-]([0-9]{3})[-]([0-9]{3})[-]([0-9]{2})[-]([0-9]{2})$/';
echo "Все верно.\n";
} else {
echo "Укажите номер в формате «8(ххх)-ххх хх хх», «8-ххх-ххх-хх-хх» или «8хххххххххх»!\n";
}
PD9waHAKJHRleHQgICAgPSAnODkxMTQwMDEyMzQnOwokcmVnZXhwMSA9ICcvXjhbMC05XXsxMH0kLyc7CiRyZWdleHAyID0gJy9eOFsoXShbMC05XXszfSlbKV1bLV0oWzAtOV17M30pWyBdKFswLTldezJ9KVsgXShbMC05XXsyfSkkLyc7CiRyZWdleHAzID0gJy9eOFstXShbMC05XXszfSlbLV0oWzAtOV17M30pWy1dKFswLTldezJ9KVstXShbMC05XXsyfSkkLyc7CmlmICgocHJlZ19tYXRjaCgkcmVnZXhwMSwgJHRleHQpKSAgJiYgKHByZWdfbWF0Y2goJHJlZ2V4cDIsICR0ZXh0KSkgJiYgKHByZWdfbWF0Y2goJHJlZ2V4cDMsICR0ZXh0KSkpIHsKICAgIGVjaG8gItCS0YHQtSDQstC10YDQvdC+LlxuIjsKfSBlbHNlIHsKICAgIGVjaG8gItCj0LrQsNC20LjRgtC1INC90L7QvNC10YAg0LIgINGE0L7RgNC80LDRgtC1IMKrOCjRhdGF0YUpLdGF0YXRhSDRhdGFINGF0YXCuywgwqs4LdGF0YXRhS3RhdGF0YUt0YXRhS3RhdGFwrsg0LjQu9C4IMKrONGF0YXRhdGF0YXRhdGF0YXRhdGFwrshXG4iOwp9