<?php
function dump_preg(array $string_list)
{
$pattern_list = array(
'/^(?!(9|8)\1{5})/'
,'/^(?!(9{6}|8{6}))/'
);
$result = 0;
foreach($pattern_list as $key => $pattern)
{
foreach ($string_list as $string)
{
$result = preg_match($pattern, $string);
echo "[{$key}] '{$string}': {$result}\n";
}
}
}
echo '<pre>';
dump_preg(array(
'999999asdasdsd'
,'888888lol'
,'888a88899'
,'88489asdfs'
,'999888zxzxcv'
,''
));
echo '</pre>';