<?php
$input = "+ 7-(925)- 455-41 - 23";
$check = '#^(\\-|\\(|\\)| )*(([+](\\-|\\(|\\)| )*7)|8)((\\-|\\(|\\)| )*[0-9]){10}$#';
echo "Верно\n";
}else{
echo"Ошибка\n";
}
$zamena = '#[(\\-|\\(|\\)| )*(([+](\\-|\\(|\\)| )*7)](\\-|\\(|\\)| )*#';
echo $output;
PD9waHAKCgplcnJvcl9yZXBvcnRpbmcoLTEpOwoKJGlucHV0ID0gIisgNy0oOTI1KS0gNDU1LTQxIC0gMjMiOwokY2hlY2sgPSAnI14oXFwtfFxcKHxcXCl8ICkqKChbK10oXFwtfFxcKHxcXCl8ICkqNyl8OCkoKFxcLXxcXCh8XFwpfCApKlswLTldKXsxMH0kIyc7CmlmKHByZWdfbWF0Y2goJGNoZWNrLCAkaW5wdXQpKXsKCWVjaG8gItCS0LXRgNC90L5cbiI7Cn1lbHNlewoJZWNobyLQntGI0LjQsdC60LBcbiI7Cn0KJHphbWVuYSA9ICcjWyhcXC18XFwofFxcKXwgKSooKFsrXShcXC18XFwofFxcKXwgKSo3KV0oXFwtfFxcKHxcXCl8ICkqIyc7CiRvdXRwdXQgPSBwcmVnX3JlcGxhY2UoJHphbWVuYSwgKzcsICRpbnB1dCk7CmVjaG8gJG91dHB1dDs=