Skip to content

Commit f9b217f

Browse files
GeertDDjaviereguiluz
authored andcommitted
Compiled PHP for customized route matching
1 parent 39dfbe5 commit f9b217f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

book/routing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -996,7 +996,7 @@ variables that are passed into the expression:
996996
Behind the scenes, expressions are compiled down to raw PHP. Our example
997997
would generate the following PHP in the cache directory::
998998

999-
if (rtrim($pathinfo, '/contact') === '' && (
999+
if (0 === strpos($pathinfo, '/contact') && (
10001000
in_array($context->getMethod(), array(0 => "GET", 1 => "HEAD"))
10011001
&& preg_match("/firefox/i", $request->headers->get("User-Agent"))
10021002
)) {

0 commit comments

Comments
 (0)