PHPackages                             chemaclass/edifact-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. chemaclass/edifact-parser

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

chemaclass/edifact-parser
=========================

An EDIFACT file parser to extract the values from any defined segment

5.4.1(5mo ago)163.9k3[1 PRs](https://github.com/Chemaclass/edifact-parser/pulls)MITPHPPHP &gt;=8.0CI passing

Since Nov 9Pushed 3mo ago3 watchersCompare

[ Source](https://github.com/Chemaclass/edifact-parser)[ Packagist](https://packagist.org/packages/chemaclass/edifact-parser)[ Fund](https://chemaclass.com/sponsor)[ RSS](/packages/chemaclass-edifact-parser/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (16)Used By (0)

📦 EDIFACT Parser
================

[](#-edifact-parser)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/99f869cbe571a527582afb82a58bf3439414d1964f15511ce5293b631a045969/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4368656d61636c6173732f456469666163745061727365722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Chemaclass/EdifactParser/?branch=master)[![Type Coverage](https://camo.githubusercontent.com/d8f2cb570847ca37640aa73bd1586cecade72c423b6fb5a971953d5aac6bc7e5/68747470733a2f2f73686570686572642e6465762f6769746875622f4368656d61636c6173732f456469666163745061727365722f636f7665726167652e737667)](https://shepherd.dev/github/chemaclass/EdifactParser)[![CI](https://github.com/Chemaclass/EdifactParser/workflows/CI/badge.svg?branch=master)](https://github.com/Chemaclass/EdifactParser/actions)[![PHP Version](https://camo.githubusercontent.com/7f91fd16f805b376c8b9137ddc479aabdc9f79d19807832f85606cb3b74409c4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230382e302d3838393242462e7376673f7374796c653d666c61742d737175617265)](https://php.net/)

**EDIFACT** stands for *Electronic Data Interchange For Administration, Commerce, and Transport*.

This package provides a robust and extensible **PHP parser** to read, interpret, and extract data from EDIFACT-formatted files.

🔍 Not sure what EDIFACT is? [Learn more here](/docu/README.md)

---

📚 EDIFACT Format Overview
-------------------------

[](#-edifact-format-overview)

- A file is composed of multiple **segments**—each begins with a **tag** (e.g., `UNH`, `NAD`).
- Each segment contains structured data relevant to that tag.
- A **message** typically starts with a `UNH` segment and ends with a `UNT` segment.
- A **transaction** is a list of such messages within a file.

👉 Read more about segments [here](/docu/segments/README.md)

---

💾 Installation
--------------

[](#-installation)

Install via [Composer](https://packagist.org/packages/chemaclass/edifact-parser):

```
composer require chemaclass/edifact-parser
```

🧪 Examples
----------

[](#-examples)

### 🔎 Usage example

[](#-usage-example)

```
