please show me how to get file extension using php code from a string

for example if i have a string called:

$Foo = 'MyPictures.gif';

how can i extract the 'gif' part?