You can have all this number validation by this code,
<?php
$array = array(
'0 000 (000) 000-0000',
'000 (000) 000-0000',
'0-000-000-000-0000',
'000 (000) 000-0000',
'000-000-000-0000',
'000-00-0-000-0000',
'0000-00-0-000-0000',
'+000-000-000-0000',
'0 (000) 000-0000',
'+0-000-000-0000',
'0-000-000-0000',
'000-000-0000',
'(000) 000-0000',
'000-0000',
'+9981824139',
9981824139,
919981824139,
'+919981824139',
'qwqwqwqwqwqwqw'
);
foreach($array AS $no){
var_dump( ( preg_match( '/\d?(\s?|-?|\+?|\.?)((\(\d{1,4}\))|(\d{1,3})|\s?)(\s?|-?|\.?)((\(\d{1,3}\))|(\d{1,3})|\s?)(\s?|-?|\.?)((\(\d{1,3}\))|(\d{1,3})|\s?)(\s?|-?|\.?)\d{3}(-|\.|\s)\d{4}/', $no )
||
preg_match('/([0-9]{8,13})/', str_replace(' ', '', $no))
||
( preg_match('/^\+?\d+$/', $no) && strlen($no) >= 8 && strlen($no) <= 13 ) )
);
}
//var_dump (preg_match('/([0-9]{8,12})/', '99818241') );
//var_dump( strlen(9981) );
//var_dump (preg_match('/^\+?\d+$/', '+12345678') );
//var_dump (preg_match('/^\+?\d+$/', '12345678') );
This will Validate your all type of phone number and output would be
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
bool(false)