Alternate function for pathinfo() to get file extension?

I am creating a logic hook where I need to get the file extension. I have used pathinfo() to achieve the same. But when I tried to install on my 'OnDemand' instance, it resulted error saying can not use function pathinfo().
I checked this thread - Invalid usage of a reserved method name unlink() Sugar7  but the link mentioned is not found on GitHub.

Appreciate if anyone can help.

Thanks,

Shantanu