$max){ return false; } return true; } function checkstrlen($str,$min=1,$max=4){ $strlen = mb_strlen($str,'utf-8'); if($strlen<$min or $strlen>$max){ return false; }else{ return true; } } function checkint($int){ if(!is_int($int) or $int<0){ return false; }else{ return true; } }