$var = 'http://www.vimeo.com/1234567';
// VERSION 1 - one liner simmilar to DisgruntledGoat's answer above
echo substr($a,(strrpos($var,'/') !== false ? strrpos($var,'/') + 1 : 0));
// VERSION 2 - explode, reverse the array, get the first index.
echo current(array_reverse(explode('/',$var)));