PHPackages                             piotrpress/streamer - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. piotrpress/streamer

ActiveLibrary[Testing &amp; Quality](/categories/testing)

piotrpress/streamer
===================

This library is a custom PHP Stream Wrapper, which provides write/read operations and stores the data in the memory.

v1.1.0(4y ago)36.5k↓50%4GPL-3.0-or-laterPHPPHP &gt;=7.4

Since Oct 25Pushed 4y ago1 watchersCompare

[ Source](https://github.com/PiotrPress/streamer)[ Packagist](https://packagist.org/packages/piotrpress/streamer)[ Docs](https://PiotrPress)[ RSS](/packages/piotrpress-streamer/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (1)Versions (4)Used By (4)

Streamer
========

[](#streamer)

[![Tests](https://github.com/PiotrPress/streamer/actions/workflows/tests.yml/badge.svg)](https://github.com/PiotrPress/streamer/actions/workflows/tests.yml/badge.svg)

This library is a custom [PHP Stream Wrapper](https://www.php.net/manual/en/class.streamwrapper.php), which provides write/read operations and stores the data in the memory.

**NOTE:** It is similar to `php:// memory`, with the difference that is reusable, i.e. after the stream has been closed you can reopen it and the written data are still there, similar to regular file. Take a look at example of usage below.

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

[](#installation)

```
composer require piotrpress/streamer
```

Usage
-----

[](#usage)

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

PiotrPress\Streamer::register( 'virtual' );

file_put_contents( 'virtual://test', 'Test data' );
echo file_get_contents( 'virtual://test' );
```

Supports
--------

[](#supports)

- `fopen()` modes: `r`, `r+`, `w`, `w+`, `a`, `a+`
- `fwrite()`, `fputs()` etc.
- `fread()`, `fgets()` etc.
- `file_get_contents()`, `file_put_contents()`
- `feof()`, `fseek()`, `ftell()`, `rewind()`
- `ftruncate()`
- `filesize()`
- `rename()`
- `unlink()`

Requirements
------------

[](#requirements)

PHP &gt;= `7.4` version.

License
-------

[](#license)

[GPL3.0](license.txt)

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity53

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 ~86 days

Total

3

Last Release

1540d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10326736?v=4)[Piotr Niewiadomski](/maintainers/PiotrPress)[@PiotrPress](https://github.com/PiotrPress)

---

Top Contributors

[![PiotrPress](https://avatars.githubusercontent.com/u/10326736?v=4)](https://github.com/PiotrPress "PiotrPress (3 commits)")

---

Tags

filefilesystemmemorymockmockupprotocolstreamstream-wrapperstreamwrappertemporarytemporary-filesurlvirtualvirtual-file-systemvirtual-filesstreamurlfilesystemmockprotocolfilememoryfaketemporarystreamwrapperstream-wrappervirtualmockup

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/piotrpress-streamer/health.svg)

```
[![Health](https://phpackages.com/badges/piotrpress-streamer/health.svg)](https://phpackages.com/packages/piotrpress-streamer)
```

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k560.2M783](/packages/phpspec-prophecy)[php-vfs/php-vfs

Virtual file system implementation for use with PHP unit testing.

572.8M24](/packages/php-vfs-php-vfs)[icecave/isolator

Dependency injection for global functions.

351.4M29](/packages/icecave-isolator)[beeyev/disposable-email-filter-php

Disposable (temporary/throwaway/fake) email detection library. Automatically updated every week.

72212.2k3](/packages/beeyev-disposable-email-filter-php)[wpbp/fakepage

Generate a fake page on the fly

112.4k](/packages/wpbp-fakepage)

PHPackages © 2026

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