He defended his thesis, titled "Die saxicolen Arten der Flechtengattungen Rinodina und Rinodinella in der Alten Welt" ("The saxicolous species of the lichen genera Rinodina and Rinodinella in the Old World) in 1988, receiving his venia docendi (Doctor of Science) in plant systematics.
That year he became a university lecturer; eventually he became an associate professor in 1995, and held this position until he retired in 2018.
Through comparative light microscopical studies of lichens in Rinodina, he developed a typology of ascospores that proved to be useful in the identification of species in that genus, and later in the taxonomy of the entire family.
He later included other characters such as secondary chemistry, ascus shapes, ascospore ontogeny, and molecular phylogenetics to help resolve taxonomic issues in the Physciaceae.
Mayrhofer has explored extensively several mountainous areas in Austria and Slovenia and has compiled an annotated inventory of lichens in the Alps.