PHPackages                             mrkrstphr/php-gedcom - 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. mrkrstphr/php-gedcom

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

mrkrstphr/php-gedcom
====================

A GEDCOM file parser (read + write) for PHP 5.3+

1.0.1(6y ago)3715.1k44[8 issues](https://github.com/mrkrstphr/php-gedcom/issues)[3 PRs](https://github.com/mrkrstphr/php-gedcom/pulls)MITPHPPHP &gt;=5.3CI failing

Since Jan 29Pushed 3y ago10 watchersCompare

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

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

php-gedcom
==========

[](#php-gedcom)

This project is no longer actively maintained. I may pick it back up in the future, but right now I have no need.
-----------------------------------------------------------------------------------------------------------------

[](#this-project-is-no-longer-actively-maintained-i-may-pick-it-back-up-in-the-future-but-right-now-i-have-no-need)

[![Build Status](https://camo.githubusercontent.com/72f05e2f002f8b59ee57d790db5a00c0297bbe8261cdb8dc532a725eeef7b9f4/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f6d726b7273747068722f7068702d676564636f6d2e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/mrkrstphr/php-gedcom)

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

[](#requirements)

- php-gedcom 1.0+ requires PHP 5.3 (or later).

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

[](#installation)

There are two ways of installing php-gedcom.

### Composer

[](#composer)

To install php-gedcom in your project using composer, simply add the following require line to your project's `composer.json` file:

```
{
    "require": {
        "mrkrstphr/php-gedcom": "1.0.*"
    }
}

```

### Download and \_\_autoload

[](#download-and-__autoload)

If you are not using composer, you can download an archive of the source from GitHub and extract it into your project. You'll need to setup an autoloader for the files, unless you go through the painstaking process if requiring all the needed files one-by-one. Something like the following should suffice:

```
spl_autoload_register(function ($class) {
    $pathToPhpGedcom = __DIR__ . '/library/'; // TODO FIXME

    if (!substr(ltrim($class, '\\'), 0, 7) == 'PhpGedcom\\') {
        return;
    }

    $class = str_replace('\\', DIRECTORY_SEPARATOR, $class) . '.php';
    if (file_exists($pathToPhpGedcom . $class)) {
        require_once($pathToPhpGedcom . $class);
    }
});
```

### Usage

[](#usage)

To parse a GEDCOM file and load it into a collection of PHP Objects, simply instantiate a new Parser object and pass it the file name to parse. The resulting Gedcom object will contain all the information stored within the supplied GEDCOM file:

```
$parser = new \PhpGedcom\Parser();
$gedcom = $parser->parse('tmp\gedcom.ged');

foreach ($gedcom->getIndi() as $individual) {
    echo $individual->getId() . ': ' . current($individual->getName())->getSurn() .
        ', ' . current($indi->$individual())->getGivn();
}
```

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 92.3% 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 ~2597 days

Total

2

Last Release

2260d ago

### Community

Maintainers

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

---

Top Contributors

[![mrkrstphr](https://avatars.githubusercontent.com/u/164472?v=4)](https://github.com/mrkrstphr "mrkrstphr (36 commits)")[![stuporglue](https://avatars.githubusercontent.com/u/16576?v=4)](https://github.com/stuporglue "stuporglue (2 commits)")[![WorkingDevel](https://avatars.githubusercontent.com/u/774381?v=4)](https://github.com/WorkingDevel "WorkingDevel (1 commits)")

---

Tags

parsergedcom

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/mrkrstphr-php-gedcom/health.svg)

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

###  Alternatives

[nikic/php-parser

A PHP parser written in PHP

17.4k902.6M1.8k](/packages/nikic-php-parser)[doctrine/lexer

PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.

11.2k910.8M118](/packages/doctrine-lexer)[erusev/parsedown

Parser for Markdown.

15.0k151.8M732](/packages/erusev-parsedown)[league/commonmark

Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)

3.0k404.0M702](/packages/league-commonmark)[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)

PHPackages © 2026

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