phpframeworksroutes

Is there an standalone PHP routing library?


I'm looking to add some dynamic, REST-esque routing to a PHP application. I'd love to use an existing routing library so I don't have to reinvent the wheel.

However, when I look at things like Slim and F3, they all come with things I don't want--like templating and MVC--included. Since I just want routing, I'd end up with a lot of framework code in my application that I don't need.

Is there a good library out there that only does routing? Or am I stuck with importing a full framework or reinventing the wheel?


Solution

  • Try Klein:

    Single file, standalone and robust:

    "klein.php is a lightning fast router for PHP 5.3+"

    https://github.com/chriso/klein.php