PHPackages                             umlts/marc\_reader - 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. umlts/marc\_reader

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

umlts/marc\_reader
==================

24mIRC ScriptCI failing

Since Sep 22Pushed 5y agoCompare

[ Source](https://github.com/bartikowskiw/marc_reader)[ Packagist](https://packagist.org/packages/umlts/marc_reader)[ RSS](/packages/umlts-marc-reader/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

MarcReader
==========

[](#marcreader)

This library is intended for use cases where speed is critical. It is *way* faster than [Pear/File\_MARC](https://github.com/pear/File_MARC)especially when just some of the fields are needed. This makes the class well suited for indexing large record sets.

There is no writing functionality implemented. And there are almost no checks to see if the MARC record is valid or even just well-formed.

To sum it up: It is not a replacement for File\_MARC, it is a library for special use cases.

Usage
-----

[](#usage)

Most methods return raw data from the record. There are some methods (getSomethingAsAssocArray) which return nested, associative arrays.

All methods of the MarcRecordReader class can be called statically.

```
include_once __DIR__ . '/vendor/autoload.php';

use Umlts\MarcReader\MarcReader;
use Umlts\MarcReader\MarcRecordReader;

$mr = new MarcReader( '/path/to/marcfile.mrc', MarcReader::SOURCE_FILE );
$record = $mr->nextRaw();

// Get Leader
echo MarcRecordReader::getLeader( $record );

// Get Control Number (Tag 001)
echo MarcRecordReader::get001( $record );

// Get Control Fields
$control_fields = MarcRecordReader::getControlFields( '003', $record );

// Get Data Fields
$raw_data_fields = MarcRecordReader::getDataFields( '245', $record );
foreach ( $raw_data_fields as $field ) {
    print_r( MarcRecordReader::getDataFieldAsAssocArray( $field ) );
}

// Get whole record
$record_as_array = MarcRecordReader::getRecordAsAssocArray( $record );
print_r( $record_as_array );
```

###  Health Score

18

—

LowBetter than 7% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/32302129?v=4)[Waldemar Bartikowski](/maintainers/bartikowskiw)[@bartikowskiw](https://github.com/bartikowskiw)

---

Top Contributors

[![bartikowskiw](https://avatars.githubusercontent.com/u/32302129?v=4)](https://github.com/bartikowskiw "bartikowskiw (11 commits)")

### Embed Badge

![Health badge](/badges/umlts-marc-reader/health.svg)

```
[![Health](https://phpackages.com/badges/umlts-marc-reader/health.svg)](https://phpackages.com/packages/umlts-marc-reader)
```

###  Alternatives

[mwgg/airports

A JSON collection of ~29k entries with basic information about nearly every airport and landing strip in the world

7683.4k](/packages/mwgg-airports)[sauladam/shipment-tracker

Parses tracking information for several carriers, like UPS, USPS, DHL and GLS by simply scraping the data. No need for any kind of API access.

9845.4k](/packages/sauladam-shipment-tracker)[jstewmc/rtf

Read and write Rich Text Format (RTF) documents with PHP

46164.0k6](/packages/jstewmc-rtf)[glauberportella/cnab-layouts-parser

Parser de arquivos de configuração CNAB gerados no projeto https://github.com/glauberportella/cnab-layouts

2154.5k](/packages/glauberportella-cnab-layouts-parser)[tcds-io/php-jackson

A lightweight, flexible object serializer for PHP, inspired by FasterXML/jackson

113.4k10](/packages/tcds-io-php-jackson)

PHPackages © 2026

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