function getext5($filename) { return PATHINFO($filename,PATHINFO_EXTENSION); } print_r( getext5('index.php'))