<?php $string = "adsfasdfasd.234.asdfa.3rfr.jpg";echo pathinfo($string, PATHINFO_EXTENSION);
Standard input is empty
jpg
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!