dirname() is at least more readable, and also seems like it would be less resource-intensive than fetching all of the pathinfo data and then returning only the path portion.