strrpos gives you last occurrence of  \ in string so substring of that +1 gives You last part of class. This is related to xml, names and portability but imho \ should become "."(dots)