<?php
// error reporting (-1);
$regexp = "/^8\\([0-9]{3}\\)[-]([0-9][\s]?){7}/iu";
$i = '8(911)-506 5 65 6';
echo "Правильно\n";
} else {
echo "Неправильно\n";
}
PD9waHAKCi8vIGVycm9yIHJlcG9ydGluZyAoLTEpOwoKJHJlZ2V4cCA9ICIvXjhcXChbMC05XXszfVxcKVstXShbMC05XVtcc10/KXs3fS9pdSI7CiRpID0gJzgoOTExKS01MDYgNSA2NSA2JzsKaWYgKHByZWdfbWF0Y2goJHJlZ2V4cCwkaSkpIHsKCWVjaG8gItCf0YDQsNCy0LjQu9GM0L3QvlxuIjsKfSBlbHNlIHsKCWVjaG8gItCd0LXQv9GA0LDQstC40LvRjNC90L5cbiI7Cn0=