- substr: documentation ( source)
- var_dump: documentation ( source)
- strrpos: documentation ( source)
<?php
$c = 'App\Bar\FooControllerABC';
$length = strlen($c);
var_dump(strrpos($c, 'Controller') === $length - 10);
var_dump('Controller' == substr($c, -10));