PHPackages                             calcinai/php-mmap - 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. calcinai/php-mmap

ActiveLibrary

calcinai/php-mmap
=================

mmap for PHP

v0.1.8(9y ago)12850[1 issues](https://github.com/calcinai/php-mmap/issues)MITPHPPHP &gt;=5.4.0

Since Jun 4Pushed 9y ago2 watchersCompare

[ Source](https://github.com/calcinai/php-mmap)[ Packagist](https://packagist.org/packages/calcinai/php-mmap)[ RSS](/packages/calcinai-php-mmap/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (9)DependenciesVersions (10)Used By (0)

php-mmap
========

[](#php-mmap)

This library is a lightweight implementation of c's mmap. In previous versions of PHP, `fopen` used mmap where possible, but it looks like this was dropped in 5.3. The actual mapping is delegated to a python subprocess for compatibility and compilability .

This started as a component of another project, but it made more sense for it to be stand alone. It is synchronous in operation, but if you're reading large amounts of data it can be done piece by piece.

I have tried to make it functionally equivalent to c's implementation, but it's not quite complete due to some limitations.

I have also written [a compatible extension](https://github.com/calcinai/php-ext-mmap) that you can compile and install as a faster drop-in replacement

Setup
-----

[](#setup)

Using composer:

```
  "require": {
  	"calcinai/php-mmap": "^0.1"
  }
```

Usage
-----

[](#usage)

Via a URI (of sorts)

```
    $mmap = fopen('mmap:///dev/mem:1024?offset=0', 'rw');
```

Via wrapper method

```
    $mmap = mmap_open('/dev/mem', 1024, 0);
```

You can use `fseek()`, `fread()` and `fwrite()` on the stream. If you have a use for others, let me know.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~7 days

Recently: every ~14 days

Total

9

Last Release

3569d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2415868?v=4)[Michael Calcinai](/maintainers/calcinai)[@calcinai](https://github.com/calcinai)

---

Top Contributors

[![calcinai](https://avatars.githubusercontent.com/u/2415868?v=4)](https://github.com/calcinai "calcinai (21 commits)")

### Embed Badge

![Health badge](/badges/calcinai-php-mmap/health.svg)

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

PHPackages © 2026

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