<?php
$regexp = '/^(8|[+][ ]*7)([() -]?[0-9][() -]?){10}$/u';
$trash = '/[() -]/u';
$pureText = '+7(812)67)8 -67(67';
$anotherTrash = '/^[+]7/u';
foreach($pureNumArray as $Num){
$pureNum = $pureNum . $Num;
};
echo "Ваш номер {$pureNum}\n";
}else{
echo "Введенный номер неверен\n";
};
PD9waHAKZXJyb3JfcmVwb3J0aW5nKC0xKTsKCiRyZWdleHAgPSAnL14oOHxbK11bIF0qNykoWygpIC1dP1swLTldWygpIC1dPyl7MTB9JC91JzsKJHRyYXNoID0gJy9bKCkgLV0vdSc7CiRwdXJlVGV4dCA9ICcrNyg4MTIpNjcpOCAtNjcoNjcnOwokYW5vdGhlclRyYXNoID0gJy9eWytdNy91JzsKJHRleHQgPSBwcmVnX3JlcGxhY2UoJGFub3RoZXJUcmFzaCwgJzgnLCAkcHVyZVRleHQpOyAKCmlmKHByZWdfbWF0Y2goJHJlZ2V4cCwgJHRleHQpKXsKCSRwdXJlTnVtQXJyYXkgPSBwcmVnX3NwbGl0KCR0cmFzaCwgJHRleHQpOwoJCWZvcmVhY2goJHB1cmVOdW1BcnJheSBhcyAkTnVtKXsKCQkkcHVyZU51bSA9ICRwdXJlTnVtIC4gJE51bTsKCX07CgllY2hvICLQktCw0Ygg0L3QvtC80LXRgCB7JHB1cmVOdW19XG4iOwp9ZWxzZXsKCWVjaG8gItCS0LLQtdC00LXQvdC90YvQuSDQvdC+0LzQtdGAINC90LXQstC10YDQtdC9XG4iOwp9Ow==