PHPackages                             mrden/php-osrm - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. mrden/php-osrm

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mrden/php-osrm
==============

PHP client for Project-OSRM.

3.0.0(2y ago)0419↑14.3%1MITPHPPHP ^8.0

Since Jan 9Pushed 2y agoCompare

[ Source](https://github.com/mrden/php-osrm)[ Packagist](https://packagist.org/packages/mrden/php-osrm)[ Docs](https://github.com/mrden/php-osrm)[ RSS](/packages/mrden-php-osrm/feed)WikiDiscussions 3.x Synced yesterday

READMEChangelog (1)Dependencies (1)Versions (5)Used By (1)

php-osrm
========

[](#php-osrm)

PHP client for Project-OSRM.

Installation
------------

[](#installation)

- If Composer is already installed

```
composer require mrden/php-osrm

```

- If Composer is not installed on your system yet, you may go ahead and install it using this command line:

```
$ curl -sS https://getcomposer.org/installer | php

```

Next, add the following require entry to the `composer.json` file in the root of your project.

```
{
    "require" : {
        "mrden/php-osrm" : "*"
    }
}
```

Finally, use Composer to install **php-osrm** and its dependencies:

```
$ php composer.phar install

```

Loading
-------

[](#loading)

```
require __DIR__ . '/vendor/autoload.php';
```

API
---

[](#api)

- [Nearest](https://github.com/riverside/php-osrm/tree/master/examples/nearest.php) - Snaps a coordinate to the street network and returns the nearest `n` matches.
- [Route](https://github.com/riverside/php-osrm/tree/master/examples/route.php) - Finds the fastest route between coordinates in the supplied order.
- [Table](https://github.com/riverside/php-osrm/tree/master/examples/table.php) - Computes the duration of the fastest route between all pairs of supplied coordinates. Returns the durations or distances or both between the coordinate pairs.
- [Match](https://github.com/riverside/php-osrm/tree/master/examples/match.php) - Map matching matches/snaps given GPS points to the road network in the most plausible way.
- [Trip](https://github.com/riverside/php-osrm/tree/master/examples/trip.php) - Solves the Traveling Salesman Problem using a greedy heuristic (farthest-insertion algorithm) for 10 or more waypoints and uses brute force for less than 10 waypoints.
- [Tile](https://github.com/riverside/php-osrm/tree/master/examples/tile.php) - Generates [Mapbox Vector Tiles](https://www.mapbox.com/developers/vector-tiles/) that can be viewed with a vector-tile capable slippy-map viewer.

Links
-----

[](#links)

- [Project-OSRM (official website)](http://project-osrm.org/)
- [Project-OSRM (GitHub)](https://github.com/Project-OSRM)
- [OSRM (OpenStreetMap.org)](https://wiki.openstreetmap.org/wiki/Open_Source_Routing_Machine)

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 61.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~375 days

Total

5

Last Release

867d ago

Major Versions

1.0.0 → 2.0.02022-04-08

2.x-dev → 3.0.02024-02-17

PHP version history (3 changes)1.0.0PHP &gt;=7.0

2.0.0PHP 7.\* || 8.\*

3.0.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/061350964bbda42d813c08324091fcb1fc27a523eaf8f95ecf9aade420d63851?d=identicon)[mrden](/maintainers/mrden)

---

Top Contributors

[![riverside](https://avatars.githubusercontent.com/u/43607?v=4)](https://github.com/riverside "riverside (11 commits)")[![mrden](https://avatars.githubusercontent.com/u/331554?v=4)](https://github.com/mrden "mrden (7 commits)")

---

Tags

phpdistanceosmOpenStreetMaposrm

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mrden-php-osrm/health.svg)

```
[![Health](https://phpackages.com/badges/mrden-php-osrm/health.svg)](https://phpackages.com/packages/mrden-php-osrm)
```

###  Alternatives

[riverside/php-osrm

PHP client for Project-OSRM.

1230.6k](/packages/riverside-php-osrm)[kenguest/services-openstreetmap

More information available at https://pear.php.net/package/Services\_OpenStreetMap

20341.5k](/packages/kenguest-services-openstreetmap)[mediawiki/maps

Adds various mapping features to MediaWiki

84152.3k3](/packages/mediawiki-maps)[dantsu/php-osm-static-api

PHP library to easily get static image from OpenStreetMap (OSM), add markers and draw lines.

97161.1k1](/packages/dantsu-php-osm-static-api)[jeroendesloovere/distance

Get distance between two locations using PHP.

3665.3k](/packages/jeroendesloovere-distance)[jweiland/maps2

Maps2 - Create maps with Marker, Area, Routes or Radius based on Google Maps or OpenStreetMap

1595.0k19](/packages/jweiland-maps2)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
