PHPackages                             legionth/line-react - 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. legionth/line-react

ActiveLibrary

legionth/line-react
===================

v0.2.0(8y ago)416MITPHPPHP &gt;=5.3

Since Oct 5Pushed 8y ago1 watchersCompare

[ Source](https://github.com/legionth/php-line-react)[ Packagist](https://packagist.org/packages/legionth/line-react)[ RSS](/packages/legionth-line-react/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (1)Dependencies (3)Versions (3)Used By (0)

legionth/line-react
===================

[](#legionthline-react)

Line reader stream to forward complete lines to a stream.

**Table of Contents**

- [Usage](#usage)
- [LineReader](#linereader)
- [License](#license)

Usage
-----

[](#usage)

### LineReader

[](#linereader)

The center of this project is the `LineReader` class. This class checks incoming data for an new line delimiter, if the delimeter has been found in the current data chunk the data will be exposed on the stream. When the new line delimeter isn't found the data chunk, it will be buffered until a delimiter occures. The `LineReader` is a duplex stream, so a readable and writable stream at the same time.

Checkout `examples` how you can use this project.

```
$ cat words.txt | php examples/readLine.php

```

This example makes clear what example this project can be used for. Every line with a new line delimiter will put into the readable stream. Every other line without a new line delimiter will be buffered until another occures.

The first parameter of the `LineReader` is the custom delimiter. The default value of this delimiter is `PHP_EOL`.

Install
-------

[](#install)

The recommended way to install this library is [through Composer](https://getcomposer.org). [New to Composer?](https://getcomposer.org/doc/00-intro.md)

This will install the latest supported version:

```
$ composer require legionth/line-react:^0.2
```

See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades.

License
-------

[](#license)

MIT

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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

Total

2

Last Release

3213d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1578709?v=4)[Niels Theen](/maintainers/legionth)[@legionth](https://github.com/legionth)

---

Top Contributors

[![legionth](https://avatars.githubusercontent.com/u/1578709?v=4)](https://github.com/legionth "legionth (13 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/legionth-line-react/health.svg)

```
[![Health](https://phpackages.com/badges/legionth-line-react/health.svg)](https://phpackages.com/packages/legionth-line-react)
```

###  Alternatives

[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k251.2M24.6k](/packages/friendsofphp-php-cs-fixer)[react/react

ReactPHP: Event-driven, non-blocking I/O with PHP.

9.1k3.7M65](/packages/react-react)[react/socket

Async, streaming plaintext TCP/IP and secure TLS socket server and client connections for ReactPHP

1.3k135.6M452](/packages/react-socket)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78127.7M460](/packages/react-http)[react/child-process

Event-driven library for executing child processes with ReactPHP.

34691.0M156](/packages/react-child-process)[clue/stdio-react

Async, event-driven console input &amp; output (STDIN, STDOUT) for truly interactive CLI applications, built on top of ReactPHP

20011.0M27](/packages/clue-stdio-react)

PHPackages © 2026

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