PHPackages                             fuitad/string-sequencer - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. fuitad/string-sequencer

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

fuitad/string-sequencer
=======================

PHP package that allows you to parse strings as sequences

1.0.1(9y ago)026MITPHPPHP &gt;=5.4.0

Since Aug 12Pushed 9y ago1 watchersCompare

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

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

StringSequencer
===============

[](#stringsequencer)

==============

PHP package that allows you to parse strings as sequences.

Installation
============

[](#installation)

Require this package with Composer

```
composer require fuitad/string-sequencer
```

Usage
-----

[](#usage)

Import the class in your PHP file

```
use \Fuitad\StringSequencer;
```

### static from() method:

[](#static-from-method)

```
use \Fuitad\StringSequencer;

$str = "http://www.google.com/page[:1:1:5:].html";
$result = StringSequencer::from($str);
```

Will return.

```
array:5 [
  0 => "http://www.google.com/page1.html"
  1 => "http://www.google.com/page2.html"
  2 => "http://www.google.com/page3.html"
  3 => "http://www.google.com/page4.html"
  4 => "http://www.google.com/page5.html"
]

```

### static multi() method:

[](#static-multi-method)

```
$str = "http://www.google.com/page[:1:1:5:]-[:20:5:40:].html";
$result = StringSequencer::multi($str);
```

Will return.

```
array:25 [
  0 => "http://www.google.com/page1-20.html"
  1 => "http://www.google.com/page1-25.html"
  2 => "http://www.google.com/page1-30.html"
  3 => "http://www.google.com/page1-35.html"
  4 => "http://www.google.com/page1-40.html"
  5 => "http://www.google.com/page2-20.html"
  6 => "http://www.google.com/page2-25.html"
  7 => "http://www.google.com/page2-30.html"
  8 => "http://www.google.com/page2-35.html"
  9 => "http://www.google.com/page2-40.html"
  10 => "http://www.google.com/page3-20.html"
  11 => "http://www.google.com/page3-25.html"
  12 => "http://www.google.com/page3-30.html"
  13 => "http://www.google.com/page3-35.html"
  14 => "http://www.google.com/page3-40.html"
  15 => "http://www.google.com/page4-20.html"
  16 => "http://www.google.com/page4-25.html"
  17 => "http://www.google.com/page4-30.html"
  18 => "http://www.google.com/page4-35.html"
  19 => "http://www.google.com/page4-40.html"
  20 => "http://www.google.com/page5-20.html"
  21 => "http://www.google.com/page5-25.html"
  22 => "http://www.google.com/page5-30.html"
  23 => "http://www.google.com/page5-35.html"
  24 => "http://www.google.com/page5-40.html"
]

```

### Formatting

[](#formatting)

You can also add a sprintf compatible pattern to format the output.

```
$str = "http://www.google.com/page[:1:1:5:%02d:].html";
$result = StringSequencer::from($str);
```

Will return

```
array:5 [
  0 => "http://www.google.com/page01.html"
  1 => "http://www.google.com/page02.html"
  2 => "http://www.google.com/page03.html"
  3 => "http://www.google.com/page04.html"
  4 => "http://www.google.com/page05.html"
]

```

### Back Reference

[](#back-reference)

If you need to have the same iteration done multiple times in a string (versus having different iterations performed on a string), you can use back references. Keep in mind that while the syntax kinda looks like regular expression back references, it is not.

```
$str = "http://www.google.com/page[:1:1:5:%02d:]/[\\1].html";
$result = StringSequencer::from($str);
```

Will return.

```
array:5 [
  0 => "http://www.google.com/page1/1.html"
  1 => "http://www.google.com/page2/2.html"
  2 => "http://www.google.com/page3/3.html"
  3 => "http://www.google.com/page4/4.html"
  4 => "http://www.google.com/page5/5.html"
]

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

Total

2

Last Release

3466d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a64852765202368cc8417b043a766fe724c4fc3bbfa959d850f8820a6653cd96?d=identicon)[Fuitad](/maintainers/Fuitad)

---

Top Contributors

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

---

Tags

string sequence sequencer

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/fuitad-string-sequencer/health.svg)

```
[![Health](https://phpackages.com/badges/fuitad-string-sequencer/health.svg)](https://phpackages.com/packages/fuitad-string-sequencer)
```

###  Alternatives

[mtdowling/jmespath.php

Declaratively specify how to extract elements from a JSON document

2.0k472.8M135](/packages/mtdowling-jmespathphp)[opis/closure

A library that can be used to serialize closures (anonymous functions) and arbitrary data.

2.6k230.0M282](/packages/opis-closure)[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M226](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M63](/packages/sabberworm-php-css-parser)[michelf/php-markdown

PHP Markdown

3.5k52.4M343](/packages/michelf-php-markdown)[jms/metadata

Class/method/property metadata management in PHP

1.8k152.8M88](/packages/jms-metadata)

PHPackages © 2026

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