--TEST-- Symfony Routing pattern: null comparison with coalesce assign route lookup --FILE-- routes[$name] ?? null; } } function resolve_route(RouteCollectionLookup $routes, string $name, ?Route $route = null): string { if (null === $route ??= $routes->get($name)) { return 'missing'; } return $route->name; } function main(): void { $routes = new RouteCollectionLookup(['home' => new Route('home')]); var_dump(resolve_route($routes, 'home')); var_dump(resolve_route($routes, 'missing')); var_dump(resolve_route($routes, 'missing', new Route('explicit'))); } ?> --EXPECT-- string(4) "home" string(7) "missing" string(8) "explicit"