if (utf8_strlen(end($parts)) == 0) {
satırını
if(strlen(utf8_decode(end($parts))) == 0 ) {
yapar mısınız