- substr: documentation ( source)
- strrpos: documentation ( source)
- strtoupper: documentation ( source)
- strtolower: documentation ( source)
<?php
$path = '/test/path/controller';
$lastslash = strrpos($path, '/');
$upper_path = substr($path, 0, $lastslash) . strtoupper(substr($path, $lastslash, 1)) . strtolower(substr($path, $lastslash + 1));
echo $upper_path;