PHPackages                             scottlaurent/fsrs - 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. scottlaurent/fsrs

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

scottlaurent/fsrs
=================

Free Spaced Repetition Scheduler (FSRS) Algorithm Implementation for PHP

v0.1(10mo ago)5563MITPHPPHP ^8.1|^8.2|^8.3CI passing

Since Aug 11Pushed 10mo agoCompare

[ Source](https://github.com/scottlaurent/FSRS)[ Packagist](https://packagist.org/packages/scottlaurent/fsrs)[ RSS](/packages/scottlaurent-fsrs/feed)WikiDiscussions main Synced today

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

FSRS PHP
========

[](#fsrs-php)

A PHP implementation of the Free Spaced Repetition Scheduler (FSRS) algorithm.

[![PHP Version](https://camo.githubusercontent.com/83dd395020c37276225039739320f6c8e7e99963ab21ee3d09282cb48dad2a60/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312532422d626c7565)](https://github.com/scottlaurent/fsrs)[![License](https://camo.githubusercontent.com/530b3ee994aa4ae028399465083309d0d7bf77ff10c3abc07f0d504afebc33a8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f73636f74746c617572656e742f66737273)](https://github.com/scottlaurent/fsrs/blob/main/LICENSE)[![Tests](https://github.com/scottlaurent/fsrs/actions/workflows/tests.yml/badge.svg)](https://github.com/scottlaurent/fsrs/actions/workflows/tests.yml)

FSRS is a modern spaced repetition algorithm that adapts to your memory patterns, making learning more efficient than traditional methods like Anki's default algorithm.\\n\\n## How FSRS Works\\n\\nFSRS is based on the **Three Components of Memory** model and implements several key principles:\\n\\n### Core Memory Components\\n- **Stability (S)**: Storage strength of memory - how long it can be retained\\n- **Retrievability (R)**: Retrieval strength of memory - how easily it can be recalled \\n- **Difficulty (D)**: Inherent complexity of the material (1-10 scale)\\n\\n### Key Principles\\n1. **Exponential Forgetting**: Memory follows the curve R(t) = 2^(-t/S)\\n2. **Difficulty Impact**: More complex material results in lower stability increases\\n3. **Stability Decay**: Higher current stability leads to smaller future stability gains\\n4. **Retrievability Effect**: Lower retrievability at review time enables higher stability increases\\n\\n### Memory States\\nCards progress through four distinct states:\\n- **New (0)**: Never studied before\\n- **Learning (1)**: Short-term learning with frequent reviews\\n- **Review (2)**: Long-term review with spaced intervals\\n- **Relearning (3)**: Forgotten cards returned to short-term learning"

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Quickstart](#quickstart)
- [Usage](#usage)
- [Configuration](#configuration)
- [API Reference](#api-reference)
- [Development](#development)
- [Testing](#testing)
- [Contributing](#contributing)
- [Inspiration](#inspiration)
- [License](#license)

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

[](#installation)

Install via Composer:

```
composer require scottlaurent/fsrs
```

Quickstart
----------

[](#quickstart)

```
