protected function test($str)
{
if (is_array($str)) {
foreach ($str as $s) {
if ($this->test($s)) {
return strlen($s);
}
}
} elseif (is_string($str)) {
$p = stripos($this->str, $str, $this->p);
return $p === $this->p ? strlen($str) : false;
} else {
throw new Exception('Invalid argument type');
}
}