Bu kod çalışıyor mu ?

$uzanti = strtolower(substr($resim["name"], strrpos($resim["name"], ".")));

bu satırda ne yaptığınızı anlamadım , deneme yaptım zaten hata veriyor bu satır.