$re = '/^(?:(?=(?:\s*\d\s*){10}$)(?:0\s*[2378]|1[38])|(?=(?:\s*\d\s*){6}$)1\s*3).*/m';
$str = '0299998888
02 99998888
02 9999 8888
02 99 998 888
0299 998 888
0299 998888
131999
131 999
13 19 99
1300123456
1300 123456
1300 123 456
1300 12 34 56
1300 12 34 56
13145
1300-123-456
9999 8888
(02) 9999 8888';
preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
// Print the entire match result
var_dump($matches);
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php