function to check password length in php

function to check  password length in php

function checkpassword_length($pass){
$len=strlen($pass);
if($len>=6 && $len<16){
return false;
}else{
return true;
}
}