public function max_length($str, $val) { if (!is_numeric($val)) { return FALSE; } return $val >= mb_strlen($str); }