PHPackages                             altmetric/identifiers - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. altmetric/identifiers

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

altmetric/identifiers
=====================

Collection of utilities related to the extraction, validation and normalization of various scholarly identifiers.

v1.0.0(3mo ago)29.2k↓50%1MITPHPPHP &gt;= 7.2CI passing

Since Dec 19Pushed 3mo ago6 watchersCompare

[ Source](https://github.com/altmetric/php-identifiers)[ Packagist](https://packagist.org/packages/altmetric/identifiers)[ Docs](https://github.com/altmetric/php-identifiers)[ RSS](/packages/altmetric-identifiers/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (15)Used By (0)

Identifiers [![Tests](https://github.com/altmetric/php-identifiers/actions/workflows/tests.yml/badge.svg)](https://github.com/altmetric/php-identifiers/actions/workflows/tests.yml)
====================================================================================================================================================================================

[](#identifiers-)

Collection of utilities related to the extraction, validation and normalization of various scholarly identifiers.

**Current version:** 1.0.0 **Supported PHP versions:** 7.2+

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

[](#installation)

```
$ composer require altmetric/identifiers
```

Supported identifiers
---------------------

[](#supported-identifiers)

The supported list is:

- [ADS Bibcodes](http://adsdoc.harvard.edu/abs_doc/help_pages/bibcodes.html);
- [arXiv IDs](https://arxiv.org/help/arxiv_identifier);
- [DOIs](https://www.doi.org/) (including [ISBN-As](https://www.doi.org/factsheets/ISBN-A.html));
- [Handles](https://en.wikipedia.org/wiki/Handle_System);
- [ISBNs](https://en.wikipedia.org/wiki/International_Standard_Book_Number);
- [National Clinical Trial IDs](https://clinicaltrials.gov/);
- [ORCID identifiers](http://orcid.org/);
- [PubMed IDs](http://www.ncbi.nlm.nih.gov/pubmed);
- [RePEc IDs](https://en.wikipedia.org/wiki/Research_Papers_in_Economics);
- [URNs](https://en.wikipedia.org/wiki/Uniform_Resource_Name);
- [URIs](https://en.wikipedia.org/wiki/Uniform_Resource_Identifier).

API Documentation
-----------------

[](#api-documentation)

### `public AdsBibcode::extract(string $str): array`

[](#public-adsbibcodeextractstring-str-array)

```
use Altmetric\Identifiers\AdsBibcode;

$bibcodes = AdsBibcode::extract('ADS: 1974AJ.....79..819H');
//=> ['1974AJ.....79..819H']
```

Return an array of ADS bibcodes from a given string. Will return an empty array if no matches are found.

### `public ArxivId::extract(string $str): array`

[](#public-arxividextractstring-str-array)

```
use Altmetric\Identifiers\ArxivId;

$arxivIds = ArxivId::extract("math.GT/0309136\narXiv:1501.00001v2");
//=> ['math.GT/0309136', '1501.00001v2']
```

Return an array of arXiv IDs from a given string. Will return an empty array if no matches are found.

### `public Doi::extract(string $str): array`

[](#public-doiextractstring-str-array)

```
use Altmetric\Identifiers\Doi;

$dois = Doi::extract('doi:10.1049/el.2013.3006')
//=> ['10.1049/el.2013.3006']
```

Return an array of DOIs (including [ISBN-As](https://www.doi.org/factsheets/ISBN-A.html)) from a given string. Will return an empty array if no matches are found.

### `public Handle::extract(string $str): array`

[](#public-handleextractstring-str-array)

```
use Altmetric\Identifiers\Handle;

$handles = Handle::extract('http://hdl.handle.net/10149/596901')
//=> ['10149/596901']
```

Return an array of Handles from a given string. Will return an empty array if no matches are found.

### `public Isbn::extract(string $str): array`

[](#public-isbnextractstring-str-array)

```
use Altmetric\Identifiers\Isbn;

$isbns = Isbn::extract("ISBN: 9780805069099\nISBN: 2-7594-0269-X");
//=> ['9780805069099', '9782759402694']
```

Return an array of ISBN-13s from a given string. Will convert ISBN-As and ISBN-10s to ISBN-13s automatically and return an empty array if no matches are found.

### `public NationalClinicalTrialId::extract(string $str): array`

[](#public-nationalclinicaltrialidextractstring-str-array)

```
use Altmetric\Identifiers\NationalClinicalTrialId;

$nctIds = NationalClinicalTrialId::extract('Trial ID: NCT00000106');
//=> ['NCT00000106']
```

Return an array of National Clinical Trial IDs from a given string. Will return an empty array if no matches are found.

### `public OrcidId::extract(string $str): array`

[](#public-orcididextractstring-str-array)

```
use Altmetric\Identifiers\OrcidId;

$orcidIds = OrcidId::extract('orcid.org/0000-0002-0088-0058');
//=> ['0000-0002-0088-0058']
```

Return an array of ORCID identifiers from a given string. Will return an empty array if no matches are found.

### `public PubmedId::extract(string $str): array`

[](#public-pubmedidextractstring-str-array)

```
use Altmetric\Identifiers\PubmedId;

$pubmedIds = PubmedId::extract("23193287\n14599470\nhttps://www.ncbi.nlm.nih.gov/pubmed/123\npmid:456\ninfo:pmid/789");
//=> ['23193287', '14599470', '123', '456', '789']
```

Return an array of PubMed IDs from a given string. Will return an empty array if no matches are found.

### `public RepecId::extract(string $str): array`

[](#public-repecidextractstring-str-array)

```
use Altmetric\Identifiers\RepecId;

$repecIds = RepecId::extract("RePEc:wbk:wbpubs:2266\nRePEc:inn:wpaper:2016-03");
//=> ['RePEc:wbk:wbpubs:2266', 'RePEc:inn:wpaper:2016-03']
```

Return an array of RePEc identifiers from a given string. Will return an empty array if no matches are found.

### `public Urn::extract(string $str): array`

[](#public-urnextractstring-str-array)

```
use Altmetric\Identifiers\Urn;

$urns = Urn::extract("urn:foo:bar\nURN:FOO:BA%2CZ");
//=> ['urn:foo:bar', 'urn:foo:BA%2cZ']
```

Return an array of URNs from a given string. Will return an empty array if no matches are found.

### `public Uri::extract(string $str): array`

[](#public-uriextractstring-str-array)

```
use Altmetric\Identifiers\Uri;

$uris = Uri::extract("http://www.altmetric.com:80/foo?bar#1");
//=> ['http://www.altmetric.com:80/foo?bar#1']
```

Return an array of URIs from a given string. Will return an empty array if no matches are found.

Ruby version
------------

[](#ruby-version)

We also maintain [a version of this library for Ruby](https://github.com/altmetric/identifiers).

Acknowledgements
----------------

[](#acknowledgements)

- Thanks to Jeff Roberson's ["Regular Expression URI Validation"](http://jmrware.com/articles/2009/uri_regexp/URI_regex.html)

License
-------

[](#license)

Copyright © 2016-2026 Altmetric LLP

Distributed under the [MIT License](http://opensource.org/licenses/MIT).

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance79

Regular maintenance activity

Popularity27

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 84.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 ~256 days

Recently: every ~747 days

Total

14

Last Release

109d ago

Major Versions

v0.10.1 → v1.0.02026-01-29

PHP version history (2 changes)v0.1.0PHP &gt;= 5.4.0

v1.0.0PHP &gt;= 7.2

### Community

Maintainers

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

---

Top Contributors

[![mudge](https://avatars.githubusercontent.com/u/287?v=4)](https://github.com/mudge "mudge (75 commits)")[![jbilbo](https://avatars.githubusercontent.com/u/111434?v=4)](https://github.com/jbilbo "jbilbo (9 commits)")[![konieczkow](https://avatars.githubusercontent.com/u/581399?v=4)](https://github.com/konieczkow "konieczkow (4 commits)")[![andreybolonin](https://avatars.githubusercontent.com/u/2576509?v=4)](https://github.com/andreybolonin "andreybolonin (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/altmetric-identifiers/health.svg)

```
[![Health](https://phpackages.com/badges/altmetric-identifiers/health.svg)](https://phpackages.com/packages/altmetric-identifiers)
```

PHPackages © 2026

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