PHPackages                             ottosmops/ids - 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. [CLI &amp; Console](/categories/cli)
4. /
5. ottosmops/ids

ActiveLibrary[CLI &amp; Console](/categories/cli)

ottosmops/ids
=============

parse an ids-string to an array

v1.1.1(4mo ago)11021MITPHPPHP &gt;=7.1CI failing

Since Jan 26Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/ottosmops/ids)[ Packagist](https://packagist.org/packages/ottosmops/ids)[ Docs](https://github.com/ottosmops/ottosmops/ids)[ RSS](/packages/ottosmops-ids/feed)WikiDiscussions master Synced 1w ago

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

Parse ids to an array
=====================

[](#parse-ids-to-an-array)

[![Tests](https://github.com/ottosmops/ids/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/ottosmops/ids/actions/workflows/tests.yml)[![Software License](https://camo.githubusercontent.com/942e017bf0672002dd32a857c95d66f28c5900ab541838c6c664442516309c8a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Latest Stable Version](https://camo.githubusercontent.com/fd4ada44c2526a687e36cde6923a3976b4a8873213a479aa6f4f7500d342fd68/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f74746f736d6f70732f6964732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ottosmops/ids)[![Packagist Downloads](https://camo.githubusercontent.com/d1649391e6084a20b6df6d37bc71a69329074305a443c88385d14dffb6d9a34f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6f74746f736d6f70732f6964732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ottosmops/ids)

Idea
----

[](#idea)

For PHP CLI or Api, if you want to have an option for one or more ids (integers), this very small package is a helper, which parses a string to an array of ids.

InputOutput1\[1\]1,2\[1,2\]1-3\[1,2,3\]1-5,7,8\[1,2,3,4,5,7,8\]Usage
-----

[](#usage)

The usage is very simple:

```
$ids = '1-3';
$array = Ids::parse($ids); // [1,2,3]
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance76

Regular maintenance activity

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.7% 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 ~1269 days

Total

3

Last Release

130d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/76f31e7e6772db47a91388ed82840fae1fa57185bb82a64924bb3839697222c2?d=identicon)[ottosmops](/maintainers/ottosmops)

---

Top Contributors

[![ottosmops](https://avatars.githubusercontent.com/u/4144389?v=4)](https://github.com/ottosmops "ottosmops (6 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (1 commits)")

---

Tags

apiclihelperottosmops

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ottosmops-ids/health.svg)

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

###  Alternatives

[buggregator/trap

A simple and powerful tool for debugging PHP applications.

2591.7M40](/packages/buggregator-trap)[zenddevops/client

ZF2 CLI tool to access Zend Server Web API

225.1k](/packages/zenddevops-client)[renoki-co/php-helm

PHP Helm Processor is a process wrapper for Kubernetes' Helm v3 CLI. You can run programmatically Helm v3 commands, directly from PHP, with a simple syntax.

1310.5k](/packages/renoki-co-php-helm)

PHPackages © 2026

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