symfony/symfony-docs — pull request #4343 by GeertDD (2014-10-20 08:38:07+00:00)
Title: Compiled PHP for customized route matching

The second parameter of `rtrim()` is a character mask. By checking if `rtrim($pathinfo, '/contact') === ''`, `$pathinfo` could be any URL containing those characters and not only "/contact" which was configured as the route path, for example:

$pathinfo = '/octocat';
var_dump(rtrim($pathinfo, '/contact') === ''); // bool(true)