PHPackages                             wiwofone/memorize - 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. wiwofone/memorize

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

wiwofone/memorize
=================

A PHP implementation of the SM-2 algorithm

1.0.1(12y ago)321238[2 issues](https://github.com/wiwofone/memorize/issues)MITPHPPHP &gt;=5.4.0

Since Apr 24Pushed 10y ago4 watchersCompare

[ Source](https://github.com/wiwofone/memorize)[ Packagist](https://packagist.org/packages/wiwofone/memorize)[ Docs](https://github.com/wiwofone/memorize)[ RSS](/packages/wiwofone-memorize/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (2)Dependencies (1)Versions (4)Used By (0)

Memorize
========

[](#memorize)

[![Build Status](https://camo.githubusercontent.com/597de37b20b408905774ada23e61c5ea7b6cdfe02f4fb8cdfb194b8adad851aa/68747470733a2f2f7472617669732d63692e6f72672f7769776f666f6e652f6d656d6f72697a652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/wiwofone/memorize)

*A PHP implementation of the SM-2 algorithm.*

About
-----

[](#about)

This is a library created by me to try out popular tools such as Travis, Packagist and Composer, as well as setting up a library structure and enhancing my understanding of test driven development. While being a test project for me, the library is still completely usable and could be used by any database of questions and answers to implement spaced repetition in an application.

Features
--------

[](#features)

- Calculate the interval in which to repeat an item after the n:th repetition based on an E-factor.
- Calculate an E-factor for an item based on the old factor (or no factor) and a response quality.

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

[](#installation)

Memorize is installed through [Composer](http://getcomposer.org/doc/00-intro.md). Add the following to your `composer.json` file.

```
{
    "require": {
    	"wiwofone/memorize": "1.*"
	}
}
```

The algorithm
-------------

[](#the-algorithm)

SM is a family of algorithms made popular by the SuperMemo software package. The Memorize library implements the complete [SM-2 algorithm](http://www.supermemo.com/english/ol/sm2.htm) in PHP. The `SM2` class handles calculating repetition intervals and E-factors. The `Card` class handles flash cards and how many times they have been virtually repeated. Finally, the `Repeater` class handles actual repetition of a `CardQueue`, deciding which cards to repeat first and if they have been repeated successfully or not.

Testing
-------

[](#testing)

Run PHPUnit with `$ phpunit` in the root directory.

Author
------

[](#author)

- Shahin Zarrabi -  - [@wiwofone](http://twitter.com/wiwofone) -

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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

4405d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1745801?v=4)[Shahin Zarrabi](/maintainers/wiwofone)[@wiwofone](https://github.com/wiwofone)

---

Top Contributors

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

---

Tags

spaced repetitionSM-2supermemo

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/wiwofone-memorize/health.svg)

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

###  Alternatives

[spatie/laravel-stats

Track application stat changes over time

449259.2k5](/packages/spatie-laravel-stats)

PHPackages © 2026

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