If ile yapabilirsin kendine göre geliştirebilirsin.


if (strlen($sif) < 4){
echo 'sifrekücük';
}
if (strlen($sif) > 8){
echo 'sifrebüyük';
}