PHPackages                             xtompie/rensen - 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. xtompie/rensen

ActiveLibrary

xtompie/rensen
==============

1.0.1(1y ago)05MITPHP

Since Jan 2Pushed 1y ago1 watchersCompare

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

READMEChangelogDependencies (1)Versions (3)Used By (0)

Rensen
======

[](#rensen)

The **Rensen** library provides a lightweight reactive system for PHP. It allows you to create reactive values that automatically update when dependencies change.

Features
--------

[](#features)

- Define **reactive values** (`R`) that automatically recompute when their dependencies change.
- Efficient dependency tracking with minimal state.

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

[](#requirements)

- PHP &gt;= 8.0

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

[](#installation)

Using [Composer](https://getcomposer.org):

```
composer require xtompie/rensen
```

Usage
-----

[](#usage)

The following example demonstrates how to define reactive values and react to their changes:

```
use Xtompie\Rensen\R;

// Define reactive values
$a = new R(fn() => 1);
$b = new R(fn() => 2);

// Create a dependent reactive value
$c = new R(fn() => $a() + $b());

// React to changes in $c
new R(fn() => print("c: {$c()}\n"));

// Initial output:
// c: 3

// Change $a
$a(fn() => 10);

// Outputs:
// c: 12
```

### Explanation

[](#explanation)

1. **Reactive values** (`R`) are created using a callable.
2. Dependencies are automatically tracked. For example, `$c` depends on `$a` and `$b`.
3. When a dependency changes, all dependent values and reactions are updated.

Why Rensen?
-----------

[](#why-rensen)

Rensen brings a reactive programming model to PHP. Inspired by modern frontend frameworks, it enables automatic propagation of changes in a simple and efficient way.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance40

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

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

Total

2

Last Release

500d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0c1316cdb671814b72350d75b23d7cafbde97ead0c21ac5613171a298bb15736?d=identicon)[xtompie](/maintainers/xtompie)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/xtompie-rensen/health.svg)

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

PHPackages © 2026

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