PHPackages                             deploymenthawk/php-har - 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. deploymenthawk/php-har

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

deploymenthawk/php-har
======================

A lightweight package for working with HAR files.

1.1.1(2y ago)019MITPHPPHP ^8.1

Since Apr 7Pushed 2y agoCompare

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

READMEChangelog (3)Dependencies (3)Versions (4)Used By (0)

PHP HAR
=======

[](#php-har)

[![GitHub Tests Action](https://github.com/deploymenthawk/php-har/actions/workflows/tests.yml/badge.svg)](https://github.com/deploymenthawk/php-har/actions/workflows/tests.yml)[![Packagist Version](https://camo.githubusercontent.com/b6a351421924ba4ab9daaf6cb36a2499fe318ed4e1948b418908f11d50ea1ece/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6465706c6f796d656e746861776b2f7068702d686172)](https://packagist.org/packages/deploymenthawk/php-har)[![Packagist License](https://camo.githubusercontent.com/883e904d6a51be8968d1d2422c343c567ad754a21b068d4845581c815efe26bf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6465706c6f796d656e746861776b2f7068702d686172)](LICENSE.md)

PHP HAR is a lightweight package for working with [HTTP Archive (HAR)](http://www.softwareishard.com/blog/har-12-spec/)files. Built with ❤️ by [DeploymentHawk](https://deploymenthawk.com).

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

[](#installation)

You can install the package via Composer:

```
composer require deploymenthawk/php-har
```

Usage
-----

[](#usage)

Create a new instance of `Har`, by passing in your HAR JSON export:

```
$har = new \DeploymentHawk\Har($json);
```

### Requests

[](#requests)

#### `totalRequests()`

[](#totalrequests)

Return the total number of network requests:

```
$har->totalRequests(); // 99
```

#### `requests()`

[](#requests-1)

Return a `Collection` of network requests:

```
$har->requests()->each(function(\DeploymentHawk\Request $request) {
    $request->url(); // https://github.com/
    $request->method(); // GET
    $request->status(); // 200
    $request->type(); // document
    $request->priority(); // VeryHigh
    $request->ipAddress(); // 140.82.121.4
    $request->time(); // 266.54
    $request->size(); // 45771
    $request->uncompressedSize(); // 223478
    $request->blockedTiming(); // 140.56
    $request->dnsTiming(); // 0.01
    $request->connectTiming(); // 52.07
    $request->sslTiming(); // 28.38
    $request->sendTiming(); // 0.25
    $request->waitTiming(); // 26.75
    $request->receiveTiming(); // 46.90
    $request->requestHeaders() // [name => value, ...]
    $request->responseHeaders() // [name => value, ...]
})
```

#### `fastestRequest()`

[](#fastestrequest)

Return the fastest network request:

```
$har->fastestRequest(); // \DeploymentHawk\Request
```

#### `slowestRequest()`

[](#slowestrequest)

Return the slowest network request:

```
$har->slowestRequest(); // \DeploymentHawk\Request
```

#### `largestRequest()`

[](#largestrequest)

Return the largest network request:

```
$har->largestRequest(); // \DeploymentHawk\Request
```

#### `smallestRequest()`

[](#smallestrequest)

Return the smallest network request:

```
$har->smallestRequest(); // \DeploymentHawk\Request
```

### Page Weight

[](#page-weight)

#### `totalSize()`

[](#totalsize)

Return the total number of bytes transferred for all network requests:

```
$har->totalSize(); // 1600544
```

#### `totalUncompressedSize()`

[](#totaluncompressedsize)

Return the total number of bytes for all resources:

```
$har->totalUncompressedSize(); // 4896355
```

### Timings

[](#timings)

#### `onContentLoadTiming()`

[](#oncontentloadtiming)

Return the time in milliseconds when the `DOMContentLoaded` event fired:

```
$har->onContentLoadTiming(); // 580.40
```

#### `onLoadTiming()`

[](#onloadtiming)

Return the time in milliseconds when the `load` event fired:

```
$har->onLoadTiming(); // 775.93
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity52

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

Every ~8 days

Total

3

Last Release

754d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9ed7cbf7e9293d8c25021d75ba740e8111aeedead9a51462f88b2e46cc7c6138?d=identicon)[A5hleyRich](/maintainers/A5hleyRich)

---

Top Contributors

[![A5hleyRich](https://avatars.githubusercontent.com/u/1422996?v=4)](https://github.com/A5hleyRich "A5hleyRich (26 commits)")

---

Tags

har

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/deploymenthawk-php-har/health.svg)

```
[![Health](https://phpackages.com/badges/deploymenthawk-php-har/health.svg)](https://phpackages.com/packages/deploymenthawk-php-har)
```

###  Alternatives

[illuminate/support

The Illuminate Support package.

582107.1M34.5k](/packages/illuminate-support)[pragmarx/countries

PHP Countries and Currencies

1.9k3.3M18](/packages/pragmarx-countries)[illuminate/events

The Illuminate Events package.

13454.3M1.8k](/packages/illuminate-events)[illuminate/config

The Illuminate Config package.

10842.7M2.2k](/packages/illuminate-config)[illuminate/session

The Illuminate Session package.

9937.4M753](/packages/illuminate-session)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)

PHPackages © 2026

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