Aside from saving a line of code, using basename() instead of pathinfo() means we don't have to worry about (hypothetical) empty filenames.