add($method, $path, $handler); } for ($i = 0; $i < 10; $i++) { [$method, $uri] = $routes[array_rand($routes)]; // Generate some random parameters $uri = str_replace(':id', rand(1, 100), $uri); $uri = str_replace(':slug', 'slug-' . rand(1, 100), $uri); $uri = str_replace(':page', rand(1, 100), $uri); $uri = str_replace(':extra', 'extra-' . rand(1, 100), $uri); $res = $r->lookup($method, $uri); if ($res !== 200) { echo "Failed to handle request for $uri - $res\n"; exit(1); } } exit(0);