Context_magic_menus is a project mainly written in PHP, it's free.
**NOTE** This module is now hosted on drupal.org. A Drupal 7 context plugin for setting active menu based on path
404: Not Found