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

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

execut/php-gedcom
=================

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

v1.2.3(5y ago)251MITPHPPHP &gt;=7.3

Since Jan 29Pushed 5y agoCompare

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

READMEChangelogDependencies (2)Versions (17)Used By (1)

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

[](#php-gedcom)

[![Latest Stable Version](https://camo.githubusercontent.com/edffe1cd0657a4939c407f2ce98ddf036068f7967eeeaf257cd9102d7fd462b6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6d6f64756c6172736f6674776172652f7068702d676564636f6d2e737667)](https://camo.githubusercontent.com/edffe1cd0657a4939c407f2ce98ddf036068f7967eeeaf257cd9102d7fd462b6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6d6f64756c6172736f6674776172652f7068702d676564636f6d2e737667)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/4be5c0811ef08ccabe2c6356f661e9e88b859b88e43ea51dc318eefdb6c6b2e9/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d6f64756c6172736f6674776172652f7068702d676564636f6d2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/modularsoftware/php-gedcom/?branch=master)[![Build Status](https://camo.githubusercontent.com/c5cefc8cea8674fdb10424222e93578eb435caba106635e0f95a079efb89a8b2/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d6f64756c6172736f6674776172652f7068702d676564636f6d2f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/modularsoftware/php-gedcom/build-status/master)[![Code Intelligence Status](https://camo.githubusercontent.com/63cc9ff028cd11c9cf64c312c63a109ca77115f648780e784d54ef7f75409933/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d6f64756c6172736f6674776172652f7068702d676564636f6d2f6261646765732f636f64652d696e74656c6c6967656e63652e7376673f623d6d6173746572)](https://scrutinizer-ci.com/code-intelligence)[![StyleCI](https://camo.githubusercontent.com/2f7b24acec6f7f0ae530218b01c2f344ced68016fca2367362c268010fad7457/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3236323738343032302f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/262784020)[![CodeFactor](https://camo.githubusercontent.com/94f46860115889a952a6e3032b0fb48afbf504c5c2b8a7bcbcb17df03c054eb3/68747470733a2f2f7777772e636f6465666163746f722e696f2f7265706f7369746f72792f6769746875622f6d6f64756c6172736f6674776172652f7068702d676564636f6d2f62616467652f6d6173746572)](https://www.codefactor.io/repository/github/modularsoftware/php-gedcom/overview/master)[![codebeat badge](https://camo.githubusercontent.com/6d4fbcb1cdfa2f531785bba6ec0ce823519ebc3b1f7b80e9c4174f12c5be7083/68747470733a2f2f636f6465626561742e636f2f6261646765732f39313166396533332d323132612d346466612d613836302d373531636462626163666637)](https://codebeat.co/projects/github-com-modularphp-gedcom-php-gedcom-master)[![Build Status](https://camo.githubusercontent.com/a95836ac46c284b0c35d4ac88087e04401a3c3a1459eae7faec5615a60656b6a/68747470733a2f2f7472617669732d63692e6f72672f6d6f64756c6172736f6674776172652f7068702d676564636f6d2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/modularsoftware/php-gedcom)

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

[](#requirements)

- php-gedcom 1.0+ requires PHP 7.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": {
        "modularsoftware/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

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~214 days

Recently: every ~13 days

Total

14

Last Release

2071d ago

PHP version history (2 changes)1.0.0PHP &gt;=5.3

v1.1.1PHP &gt;=7.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/0ffb982747c04d8d93e2db3f8d90e44864c7c2a21a4c3d00ffbe66325f3f91c4?d=identicon)[execut](/maintainers/execut)

---

Top Contributors

[![mrkrstphr](https://avatars.githubusercontent.com/u/164472?v=4)](https://github.com/mrkrstphr "mrkrstphr (33 commits)")[![jyyblue](https://avatars.githubusercontent.com/u/36446990?v=4)](https://github.com/jyyblue "jyyblue (23 commits)")[![curtisdelicata](https://avatars.githubusercontent.com/u/179251?v=4)](https://github.com/curtisdelicata "curtisdelicata (16 commits)")[![juliolopez78](https://avatars.githubusercontent.com/u/5769504?v=4)](https://github.com/juliolopez78 "juliolopez78 (6 commits)")[![juliengeneanet](https://avatars.githubusercontent.com/u/20107278?v=4)](https://github.com/juliengeneanet "juliengeneanet (5 commits)")[![skypal](https://avatars.githubusercontent.com/u/27696696?v=4)](https://github.com/skypal "skypal (4 commits)")[![stuporglue](https://avatars.githubusercontent.com/u/16576?v=4)](https://github.com/stuporglue "stuporglue (2 commits)")[![execut](https://avatars.githubusercontent.com/u/2357407?v=4)](https://github.com/execut "execut (2 commits)")[![tlesseli](https://avatars.githubusercontent.com/u/2758167?v=4)](https://github.com/tlesseli "tlesseli (2 commits)")[![vfftech](https://avatars.githubusercontent.com/u/67114434?v=4)](https://github.com/vfftech "vfftech (1 commits)")[![WorkingDevel](https://avatars.githubusercontent.com/u/774381?v=4)](https://github.com/WorkingDevel "WorkingDevel (1 commits)")[![oguz463](https://avatars.githubusercontent.com/u/22803432?v=4)](https://github.com/oguz463 "oguz463 (1 commits)")[![litui](https://avatars.githubusercontent.com/u/273040?v=4)](https://github.com/litui "litui (1 commits)")

---

Tags

parsergedcom

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/execut-php-gedcom/health.svg)](https://phpackages.com/packages/execut-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)

2.9k404.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)
