PHPackages                             kingsquare/php-mt940 - 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. kingsquare/php-mt940

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

kingsquare/php-mt940
====================

Simple MT940 parser in PHP

2.0.0(5y ago)105806.1k—4.3%63[7 issues](https://github.com/fruitl00p/php-mt940/issues)[7 PRs](https://github.com/fruitl00p/php-mt940/pulls)2MITPHPPHP &gt;=7CI failing

Since Nov 1Pushed 1y ago12 watchersCompare

[ Source](https://github.com/fruitl00p/php-mt940)[ Packagist](https://packagist.org/packages/kingsquare/php-mt940)[ Docs](https://github.com/fruitl00p/php-mt940)[ RSS](/packages/kingsquare-php-mt940/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (26)Used By (2)

[![Latest Stable Version](https://camo.githubusercontent.com/f3b1c5e7a8c170eefbcddc3bc31e86453b76ab845d85de8eef565d73f5c1d498/68747470733a2f2f706f7365722e707567782e6f72672f6b696e677371756172652f7068702d6d743934302f762f737461626c65)](https://packagist.org/packages/kingsquare/php-mt940)[![Total Downloads](https://camo.githubusercontent.com/cbcd32e9f22e3d8dc9b837191d74b7338259c6be0d9b995a64f7fe25843be0d8/68747470733a2f2f706f7365722e707567782e6f72672f6b696e677371756172652f7068702d6d743934302f646f776e6c6f616473)](https://packagist.org/packages/kingsquare/php-mt940)[![License](https://camo.githubusercontent.com/681c5cd248f4ba8d3ddedad71352f173cb6288484a349a21ef34b2839d6018b5/68747470733a2f2f706f7365722e707567782e6f72672f6b696e677371756172652f7068702d6d743934302f6c6963656e7365)](https://packagist.org/packages/kingsquare/php-mt940)

[![Scrutinizer Quality Score](https://camo.githubusercontent.com/a2bd9d0e41a0a4340d983966902854e86a4e898d633be1ff730b045ef6158531/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f66727569746c3030702f7068702d6d743934302f6261646765732f7175616c6974792d73636f72652e706e673f733d31663462303163643634623336366436666466653934326530343237333939303263643465376364)](https://scrutinizer-ci.com/g/fruitl00p/php-mt940/)[![Build Status](https://camo.githubusercontent.com/3f32cb5ca92abbc01764976d97c77e3dadd933939d8a673e495367ff1a8424d6/68747470733a2f2f7472617669732d63692e6f72672f66727569746c3030702f7068702d6d743934302e706e673f6272616e63683d6d6173746572 "Travis status")](https://travis-ci.org/fruitl00p/php-mt940)[![wercker status](https://camo.githubusercontent.com/0f7c4f7c76a3f54b58cce15e2358219562843f6d134b87b4e08c5735c4f9411b/68747470733a2f2f6170702e776572636b65722e636f6d2f7374617475732f31623230323135636339666565306534656666626537616438316461313332382f732f "wercker status")](https://app.wercker.com/project/bykey/1b20215cc9fee0e4effbe7ad81da1328)

php-mt940?
==========

[](#php-mt940)

The php-mt940 package provides a lightweight parser for [MT940](https://en.wikipedia.org/wiki/MT940) format which is used by [SWIFT](https://en.wikipedia.org/wiki/SWIFT). The output is transformed into easy to use dataclasses Transaction\_banking which itself contains Statement\_banking objects. Pretty straight forward.

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

[](#requirements)

- At least PHP 7

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

[](#installation)

If composer is not yet on your system, follow the instructions on [getcomposer.org](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx) to do so.

To add this dependency to your project, simply run the following command from the root of your project:

`composer require kingsquare/php-mt940`

This ensures that you install the latest stable release.

How to use the parser?
----------------------

[](#how-to-use-the-parser)

I've attached a simple script in the examples directory to explain it a bit more in detail, but after loading the required classes, the usage should be pretty simple:

```

```

### Included engines

[](#included-engines)

Currently the following engines are included:

- ABNAMRO ([here](./src/Parser/Banking/Mt940/Engine/Abn.php))
- ING ([here](./src/Parser/Banking/Mt940/Engine/Ing.php))
- KNAB ([here](./src/Parser/Banking/Mt940/Engine/Knab.php))
- RABOBANK ([here](./src/Parser/Banking/Mt940/Engine/Rabo.php))
- SPARKASSE ([here](./src/Parser/Banking/Mt940/Engine/Spk.php))
- TRIODOS ([here](./src/Parser/Banking/Mt940/Engine/Triodos.php))
- HSBC ([here](./src/Parser/Banking/Mt940/Engine/Hsbc.php))
- SNS ([here](./src/Parser/Banking/Mt940/Engine/Sns.php)) **Experimental**
- BUNQ ([here](./src/Parser/Banking/Mt940/Engine/Bunq.php))
- PENTA ([here](./src/Parser/Banking/Mt940/Engine/Penta.php))
- ASN ([here](./src/Parser/Banking/Mt940/Engine/Asn.php))
- KBS ([here](./src/Parser/Banking/Mt940/Engine/Kbs.php))
- ZETB ([here](./src/Parser/Banking/Mt940/Engine/Zetb.php))
- KONTIST ([here](./src/Parser/Banking/Mt940/Engine/Kontist.php))
- a default `UNKNOWN`-engine ([here](./src/Parser/Banking/Mt940/Engine/Unknown.php))

### Custom engines

[](#custom-engines)

To override engines or just try a one-off engine on a file, you can pass an engine into the `parse`-method:

```

```

Known issues
------------

[](#known-issues)

I've provided unittests but please take a look at the github issue tracker for the latest ideas's, issues or other stuff..

Future plans
------------

[](#future-plans)

I do intend to add new engines or keep everything running smoothly, but since i don't have access to any more test files, it's hard to add new engines ;) The `unknown` engine should work or atleast give some idea as to where different banks diverge from the standard. If you do have any ideas, examples or new banks that you'd like to see incorporated, please don't hesitate and send me an issue / pullrequest!

Contact
-------

[](#contact)

This is GitHub, you know where to find me :)

License
-------

[](#license)

PHP-MT940 is licensed under the MIT License - see the LICENSE file for details

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity55

Moderate usage in the ecosystem

Community31

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 76.2% 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 ~128 days

Recently: every ~334 days

Total

21

Last Release

2021d ago

Major Versions

0.11.0 → 1.02015-07-20

1.5.0 → 2.0.02020-11-05

PHP version history (4 changes)0.2PHP &gt;=5.3.0

0.9.0PHP &gt;=5.4

1.0PHP &gt;=5.5

2.0.0PHP &gt;=7

### Community

Maintainers

![](https://www.gravatar.com/avatar/11c7a09c75d2f8770e8195931b2084a6a47ace4cfab44d9bacaf23cde7699273?d=identicon)[fruitl00p](/maintainers/fruitl00p)

---

Top Contributors

[![fruitl00p](https://avatars.githubusercontent.com/u/1492861?v=4)](https://github.com/fruitl00p "fruitl00p (160 commits)")[![sevannerse](https://avatars.githubusercontent.com/u/16224533?v=4)](https://github.com/sevannerse "sevannerse (20 commits)")[![tswestendorp](https://avatars.githubusercontent.com/u/1061961?v=4)](https://github.com/tswestendorp "tswestendorp (7 commits)")[![sven-codeculture](https://avatars.githubusercontent.com/u/3930643?v=4)](https://github.com/sven-codeculture "sven-codeculture (4 commits)")[![markoheijnen](https://avatars.githubusercontent.com/u/262877?v=4)](https://github.com/markoheijnen "markoheijnen (4 commits)")[![SamMousa](https://avatars.githubusercontent.com/u/547021?v=4)](https://github.com/SamMousa "SamMousa (3 commits)")[![tpokorra](https://avatars.githubusercontent.com/u/357107?v=4)](https://github.com/tpokorra "tpokorra (2 commits)")[![rikvdh](https://avatars.githubusercontent.com/u/1267617?v=4)](https://github.com/rikvdh "rikvdh (2 commits)")[![sebastianberm](https://avatars.githubusercontent.com/u/6470150?v=4)](https://github.com/sebastianberm "sebastianberm (2 commits)")[![tuxphr34k](https://avatars.githubusercontent.com/u/8660806?v=4)](https://github.com/tuxphr34k "tuxphr34k (1 commits)")[![ddcatgg](https://avatars.githubusercontent.com/u/8475003?v=4)](https://github.com/ddcatgg "ddcatgg (1 commits)")[![doenietzomoeilijk](https://avatars.githubusercontent.com/u/648663?v=4)](https://github.com/doenietzomoeilijk "doenietzomoeilijk (1 commits)")[![hpolthof](https://avatars.githubusercontent.com/u/1415623?v=4)](https://github.com/hpolthof "hpolthof (1 commits)")[![tomcoonen](https://avatars.githubusercontent.com/u/988013?v=4)](https://github.com/tomcoonen "tomcoonen (1 commits)")[![BackEndTea](https://avatars.githubusercontent.com/u/14289961?v=4)](https://github.com/BackEndTea "BackEndTea (1 commits)")

---

Tags

parserphpparsingmt940

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kingsquare-php-mt940/health.svg)

```
[![Health](https://phpackages.com/badges/kingsquare-php-mt940/health.svg)](https://phpackages.com/packages/kingsquare-php-mt940)
```

###  Alternatives

[jejik/mt940

An MT940 bank statement parser for PHP

911.2M2](/packages/jejik-mt940)[jakubledl/dissect

Lexing and parsing in pure PHP

2244.6M11](/packages/jakubledl-dissect)[parsica-php/parsica

The easiest way to build robust parsers in PHP.

412140.4k4](/packages/parsica-php-parsica)[denissimon/formula-parser

Parsing and evaluating mathematical formulas given as strings.

81306.8k3](/packages/denissimon-formula-parser)[codelicious/php-coda-parser

PHP parser for Belgian CODA banking files

44352.9k1](/packages/codelicious-php-coda-parser)[codelicious/php-belgianbankstatement-parser

Unified parser for several bank statement formats from Belgian banks

1211.6k](/packages/codelicious-php-belgianbankstatement-parser)

PHPackages © 2026

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