PHPackages                             jkh/apache-log-parser-library - 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. jkh/apache-log-parser-library

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

jkh/apache-log-parser-library
=============================

apache parser library

1.0.0(7y ago)012MITPHP

Since May 3Pushed 7y agoCompare

[ Source](https://github.com/JaouherK/apache-log-parser-library)[ Packagist](https://packagist.org/packages/jkh/apache-log-parser-library)[ RSS](/packages/jkh-apache-log-parser-library/feed)WikiDiscussions master Synced 3d ago

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

apache log parser library
=========================

[](#apache-log-parser-library)

Install
-------

[](#install)

Using composer:

```
composer require jkh/apache-log-parser-library

```

Usage
-----

[](#usage)

Simply instantiate the class :

```
$parser = new \jkh\ApacheLogParser\ApacheLogParser();
```

And then parse the lines of your access log file :

```
$log_file = '/var/log/apache2/access.log';

$handle = fopen($log_file, "r");
if ($handle) {
    while (($line = fgets($handle)) !== false) {
        $entry = $parser->parse($line);
    }
    fclose($handle);
} else {
    echo "An error occurred: unable to open the file!\n";
}
```

Where `$entry` object will hold all data parsed.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

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

Unknown

Total

1

Last Release

2568d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9314b11ced66fdd601360ed423f28db4d9aa4aee646ebc7ce793472ef807fd9c?d=identicon)[JaouherK](/maintainers/JaouherK)

---

Top Contributors

[![JaouherK](https://avatars.githubusercontent.com/u/20973209?v=4)](https://github.com/JaouherK "JaouherK (1 commits)")

---

Tags

apache2log-parserphpparserlogsapache

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jkh-apache-log-parser-library/health.svg)

```
[![Health](https://phpackages.com/badges/jkh-apache-log-parser-library/health.svg)](https://phpackages.com/packages/jkh-apache-log-parser-library)
```

###  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)
