PHPackages                             rogerza/php-simple-text-parser - 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. rogerza/php-simple-text-parser

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

rogerza/php-simple-text-parser
==============================

A simple library intended to break texts into structured data based on configuration files.

v0.0.2(6y ago)3304↓100%2MITPHP

Since Jun 18Pushed 6y agoCompare

[ Source](https://github.com/rogerzanelato/php-simple-text-parser)[ Packagist](https://packagist.org/packages/rogerza/php-simple-text-parser)[ RSS](/packages/rogerza-php-simple-text-parser/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

PHP Simple TextParser
=====================

[](#php-simple-textparser)

About
-----

[](#about)

This is a simple, extensible, lightweight library with zero dependencies, made with the aim to make process of converting text files into structured data a little more easy.

Perfect to work with EDI Formats like Febraban CNAB240, Febraban CNAB400, Serasa Pefin etc..

**Atenttion: This library isn't ready for production yet and can have breaking changes in the next versions**

How to use
----------

[](#how-to-use)

To use this library you **must** create a Layout file defining how you want to parse a string.

You can also specify a class to use as "Encoder" and "Decoder", for example, you can definy an Encoder that gets a DateTime and encode it to to "2019-01-06" when Writing, and decode to a DateTime again when Reading.

**See folder `docs/samples/` to know the available configs**.

After the Layouts are created, you can also create a Template to combine multiple layouts and parse a String that has multiples pattern. **See sample 4 - Templates**.

Todo
----

[](#todo)

- Improve docs
- Create unit tests
- Create more loaders
- Create option to extend a Layout
- Implement an optional cache system for the template config
- Implement an Template Reader with Generator/Iterator
- Review the Unique Identification for Template Itens (array\_count\_values doesn't permit arrays)
- Create a default option for encode/decode

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

Total

2

Last Release

2476d ago

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/rogerza-php-simple-text-parser/health.svg)

```
[![Health](https://phpackages.com/badges/rogerza-php-simple-text-parser/health.svg)](https://phpackages.com/packages/rogerza-php-simple-text-parser)
```

###  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.0M284](/packages/opis-closure)[masterminds/html5

An HTML5 parser and serializer.

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

Parser for CSS Files written in PHP

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

PHP Markdown

3.5k52.4M345](/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)
