<?php

error_reporting(-1);

$input = '8- (951)-4647- 425';

$parts = preg_split("/\\s|[(]|-|[)]/", $input, 0, PREG_SPLIT_NO_EMPTY); /* разбиваем номер на части по допустимым знакам*/

$phoneNoBullshit = implode("", $parts); /*Соединяем части, получая номер*/

$regExp = "/^(8|\\+7)\\d{10}$/";

if (preg_match($regExp, $phoneNoBullshit)) {
	echo "Yep, it's a phone number.";
} 
else {
	echo "Please, enter a real phone number WITHOUT BULLSHIT, not that crap you just typed.";
}
?>
