DASPRiD / Dash

Flexible PSR-7 compliant HTTP router
BSD 2-Clause "Simplified" License
29 stars 9 forks source link

`RouteMatch#getParam()` uses `array_key_exists` is used #2

Closed Ocramius closed 10 years ago

Ocramius commented 10 years ago

As of RouteMatch#getParam(), array_key_exists is used. Can instead do: isset to speed it up:

if (isset($this->params[$key]) || array_key_exists($key, $this->params)) {
}