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

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

genealogiawebsite/php-gedcom
============================

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

v1.4.10(4y ago)241.9k12[5 issues](https://github.com/cgdsoftware/php-gedcom/issues)[1 PRs](https://github.com/cgdsoftware/php-gedcom/pulls)MITPHPPHP &gt;=8.0CI passing

Since Jan 29Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/cgdsoftware/php-gedcom)[ Packagist](https://packagist.org/packages/genealogiawebsite/php-gedcom)[ Docs](http://github.com/familytree365/php-gedcom)[ GitHub Sponsors](https://github.com/genealogiawebsite)[ RSS](/packages/genealogiawebsite-php-gedcom/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (10)Dependencies (3)Versions (50)Used By (0)

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

[](#php-gedcom)

[![Latest Stable Version](https://camo.githubusercontent.com/012ceb432c5ce4c6aa37023a1f3548b34fc99d6accd367777006c423428f30a0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f66616d696c79747265653336352f7068702d676564636f6d2e737667)](https://camo.githubusercontent.com/012ceb432c5ce4c6aa37023a1f3548b34fc99d6accd367777006c423428f30a0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f66616d696c79747265653336352f7068702d676564636f6d2e737667)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/9aaaeaa6685a3666c0716d5c3e1f81b6875eb0398d26b8677550a9b86045dc0d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f66616d696c79747265653336352f7068702d676564636f6d2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/familytree365/php-gedcom/?branch=master)[![Build Status](https://camo.githubusercontent.com/b4276cd8ba24831245bab259821ead5fa28939b1a2ede09e27dc3c639f00c10d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f66616d696c79747265653336352f7068702d676564636f6d2f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/familytree365/php-gedcom/build-status/master)[![Code Intelligence Status](https://camo.githubusercontent.com/babf92a226a702f6ada629d21732e9da634e510f11106a50c253c8904ffd0409/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f66616d696c79747265653336352f7068702d676564636f6d2f6261646765732f636f64652d696e74656c6c6967656e63652e7376673f623d6d6173746572)](https://scrutinizer-ci.com/code-intelligence)[![StyleCI](https://camo.githubusercontent.com/2f7b24acec6f7f0ae530218b01c2f344ced68016fca2367362c268010fad7457/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3236323738343032302f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/262784020)[![CodeFactor](https://camo.githubusercontent.com/fde094d428e35ceb21ed74bbc4933d452ac0851b7d508d145342acdd66b75f7c/68747470733a2f2f7777772e636f6465666163746f722e696f2f7265706f7369746f72792f6769746875622f66616d696c79747265653336352f7068702d676564636f6d2f62616467652f6d6173746572)](https://www.codefactor.io/repository/github/familytree365/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/aed0d17256605c656804e12a7596c1f25386fa86d3ffe765937075550013faf4/68747470733a2f2f7472617669732d63692e6f72672f66616d696c79747265653336352f7068702d676564636f6d2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/familytree365/php-gedcom)

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

[](#requirements)

- php-gedcom 1.0+ requires PHP 8.0 (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": {
        "familytree365/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) {
    $pathToGedcom = __DIR__ . '/library/'; // TODO FIXME

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

    $class = str_replace('\\', DIRECTORY_SEPARATOR, $class) . '.php';
    if (file_exists($pathToGedcom . $class)) {
        require_once($pathToGedcom . $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 \Gedcom\Parser();
$gedcom = $parser->parse('tmp.ged');

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

###  Health Score

50

↑

FairBetter than 95% of packages

Maintenance53

Moderate activity, may be stable

Popularity30

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity81

Battle-tested with a long release history

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

Recently: every ~15 days

Total

47

Last Release

1622d ago

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

v1.1.1PHP &gt;=7.3

v1.4PHP &gt;=8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/179251?v=4)[Curtis Delicata](/maintainers/curtisdelicata)[@curtisdelicata](https://github.com/curtisdelicata)

---

Top Contributors

[![curtisdelicata](https://avatars.githubusercontent.com/u/179251?v=4)](https://github.com/curtisdelicata "curtisdelicata (77 commits)")[![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)")[![heru0502](https://avatars.githubusercontent.com/u/32084622?v=4)](https://github.com/heru0502 "heru0502 (8 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)")[![xeanu](https://avatars.githubusercontent.com/u/82022184?v=4)](https://github.com/xeanu "xeanu (2 commits)")[![stuporglue](https://avatars.githubusercontent.com/u/16576?v=4)](https://github.com/stuporglue "stuporglue (2 commits)")[![tlesseli](https://avatars.githubusercontent.com/u/2758167?v=4)](https://github.com/tlesseli "tlesseli (2 commits)")[![webstar1027](https://avatars.githubusercontent.com/u/32419290?v=4)](https://github.com/webstar1027 "webstar1027 (2 commits)")[![WorkingDevel](https://avatars.githubusercontent.com/u/774381?v=4)](https://github.com/WorkingDevel "WorkingDevel (1 commits)")[![vfftech](https://avatars.githubusercontent.com/u/67114434?v=4)](https://github.com/vfftech "vfftech (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)")[![dench0](https://avatars.githubusercontent.com/u/3121558?v=4)](https://github.com/dench0 "dench0 (1 commits)")

---

Tags

gedcomgedcom-parsergenealogyphpphp-libraryphp8parsergedcom

###  Code Quality

TestsPHPUnit

Static AnalysisRector

Code StylePHP\_CodeSniffer

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/genealogiawebsite-php-gedcom/health.svg)](https://phpackages.com/packages/genealogiawebsite-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.8M117](/packages/doctrine-lexer)[erusev/parsedown

Parser for Markdown.

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

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

2.9k404.0M696](/packages/league-commonmark)[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M226](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M63](/packages/sabberworm-php-css-parser)

PHPackages © 2026

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