<?php
$input1 = "8(911)-506 56 56";
$input2 = "8-911-50-656-56";
$input3 = "89115065656";
$input4 = "02";
$input5 = "89115065656 позвать Люду";
// your code goes here
function IsPhone($input)
{
$regexp = '/(^\\+)?8(\\(| |\\-)?911(\\)| |\\-)?[0-9]{7}[^a-zA-Zа-яёА-ЯЁ]+/';
echo "Это правильный набор\n";
} else {
echo "Это неправильный ответ\n";
}
}
IsPhone($input1);
PD9waHAKZXJyb3JfcmVwb3J0aW5nKC0xKTsKJGlucHV0MSA9ICI4KDkxMSktNTA2IDU2IDU2IjsKJGlucHV0MiA9ICI4LTkxMS01MC02NTYtNTYiOwokaW5wdXQzID0gIjg5MTE1MDY1NjU2IjsKJGlucHV0NCA9ICIwMiI7CiRpbnB1dDUgPSAiODkxMTUwNjU2NTYg0L/QvtC30LLQsNGC0Ywg0JvRjtC00YMiOwovLyB5b3VyIGNvZGUgZ29lcyBoZXJlCmZ1bmN0aW9uIElzUGhvbmUoJGlucHV0KQp7CgkkcmVnZXhwID0gJy8oXlxcKyk/OChcXCh8IHxcXC0pPzkxMShcXCl8IHxcXC0pP1swLTldezd9W15hLXpBLVrQsC3Rj9GR0JAt0K/QgV0rLyc7CglpZiAocHJlZ19tYXRjaCgkcmVnZXhwLCAkaW5wdXQpKXsKCQllY2hvICLQrdGC0L4g0L/RgNCw0LLQuNC70YzQvdGL0Lkg0L3QsNCx0L7RgFxuIjsKCX0gZWxzZSB7CgkJZWNobyAi0K3RgtC+INC90LXQv9GA0LDQstC40LvRjNC90YvQuSDQvtGC0LLQtdGCXG4iOwoJfQp9CklzUGhvbmUoJGlucHV0MSk7