<?php
class Util {
    public static function getLastSegment($request_uri) {
        // Get the full URI
        $uri = $request_uri;
        
        // Parse the URI to get the path part
        $parsedUrl = parse_url($uri, PHP_URL_PATH);
        
        // Get the last segment of the path
        $lastSegment = basename($parsedUrl);
        
        return $lastSegment;
    }
}
?>