- 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+1) . strtoupper(substr($path, $lastslash+1, 1)) . strtolower(substr($path, $lastslash + 2));
echo $upper_path;