PHPackages                             sorge13248/m3u - 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. sorge13248/m3u

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

sorge13248/m3u
==============

M3U PHP parser &amp; creator

024PHP

Since Jan 7Pushed 3y agoCompare

[ Source](https://github.com/sorge13248/m3u)[ Packagist](https://packagist.org/packages/sorge13248/m3u)[ RSS](/packages/sorge13248-m3u/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

PHP M3u class
=============

[](#php-m3u-class)

M3u playlists manipulation (parse &amp; create) class.

Requirements:
-------------

[](#requirements)

- PHP &gt;= 7.1

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

[](#installation)

```
composer require urvin/m3u
```

Usage
-----

[](#usage)

```
$playlist =
'#EXTM3U

#EXTINF:0,TV Channel
#EXTGRP:News
http://broadcaster.tv/channel.m3u8

#EXTINF:0 group-title="Sports",Sports channel
http://broadcaster.tv/sports.m3u8

# That\'s my favourite song
#EXTINF:253,John Doe - Universe
/home/jd - universe.mp3
';

// create a playlist object
$m3u = new M3u();

// parse an existing file
$m3u->parse($playlist);

// walk through items
$entries = $m3u->getEntries();
foreach($entries as &$entry) {
    echo $entry->name, PHP_EOL;
}

// add records
$new = new M3uEntry();
$new->path = '/home/test1.mp3';
$m3u->addEntry($new);

// or this way
$m3u->addEntry(new M3uEntry([
    'path' => '/home/test2.mp3',
    'artist' => 'Unknown artist',
    'name' => 'Unknown record'
]));

// export valid m3u playlist
echo $m3u;
```

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity23

Early-stage or recently created project

 Bus Factor1

Top contributor holds 50% 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.

### Community

Maintainers

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

---

Top Contributors

[![sorge13248](https://avatars.githubusercontent.com/u/4579797?v=4)](https://github.com/sorge13248 "sorge13248 (2 commits)")[![Urvin](https://avatars.githubusercontent.com/u/2264798?v=4)](https://github.com/Urvin "Urvin (2 commits)")

### Embed Badge

![Health badge](/badges/sorge13248-m3u/health.svg)

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

###  Alternatives

[mtdowling/jmespath.php

Declaratively specify how to extract elements from a JSON document

2.0k472.8M135](/packages/mtdowling-jmespathphp)[opis/closure

A library that can be used to serialize closures (anonymous functions) and arbitrary data.

2.6k230.0M283](/packages/opis-closure)[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)[michelf/php-markdown

PHP Markdown

3.5k52.4M343](/packages/michelf-php-markdown)[jms/metadata

Class/method/property metadata management in PHP

1.8k152.8M88](/packages/jms-metadata)

PHPackages © 2026

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