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 3d ago

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

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity32

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

[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)
