Is there any standard function in PHP to find only extension of an image from the corresponding file path?
For example ff my image path is like \'/testdir/dir2/image
$ext = pathinfo( parse_url('/testdir/dir2/image.gif?foo=bar', PHP_URL_PATH), PATHINFO_EXTENSION ); //$ext will be gif