<?php
$text = "+8-(050)-934 ";
$regexp = '/^8[0-9]{10}$/';
echo "Всё правильно";
} else {
echo "Ошибка";
}
PD9waHAgCiR0ZXh0ID0gIis4LSgwNTApLTkzNCAiOwokcmVnZXhwID0gJy9eOFswLTldezEwfSQvJzsKJHRleHQgPSBzdHJfcmVwbGFjZSgiICIsICIiLCAkdGV4dCk7CiR0ZXh0ID0gc3RyX3JlcGxhY2UoIisiLCAiIiwgJHRleHQpOwokdGV4dCA9IHN0cl9yZXBsYWNlKCItIiwgIiIsICR0ZXh0KTsKJHRleHQgPSBzdHJfcmVwbGFjZSgiKCIsICIiLCAkdGV4dCk7CiR0ZXh0ID0gc3RyX3JlcGxhY2UoIikiLCAiIiwgJHRleHQpOwoKaWYgKHByZWdfbWF0Y2goJHJlZ2V4cCwgJHRleHQpKXsKCWVjaG8gItCS0YHRkSDQv9GA0LDQstC40LvRjNC90L4iOwp9IGVsc2UgewoJZWNobyAi0J7RiNC40LHQutCwIjsKfQo=