PHPackages                             zehua/laravel-xhprof - 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. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. zehua/laravel-xhprof

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

zehua/laravel-xhprof
====================

laravel-xhprof

21221PHP

Since Sep 25Pushed 7y ago1 watchersCompare

[ Source](https://github.com/zzh787272581/laravel-xhprof)[ Packagist](https://packagist.org/packages/zehua/laravel-xhprof)[ RSS](/packages/zehua-laravel-xhprof/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

laravel-xhprof
==============

[](#laravel-xhprof)

安装

```
cd xhprof/extension/
phpize
./configure --with-php-config=/path/to/php7/bin/php-config
make && sudo make install

```

配置

添加配置项到php.ini

```
[xhprof]
extension=xhprof.so
xhprof.output_dir=/data/xhprof

```

这里的/data/xhprof 就是留存xhprof记录文件的目录

创建目录

```
mkdir -p /data/xhprof

```

重启fpm

```
centos
yum restart php-fpm

mac
brew services restart php-fpm

```

**laravel里面使用**

composer载入

```
composer require zehua/laravel-xhprof:dev-master

```

加入拦截器

在middlewareGroups里面web下面增加

\\Zehua\\LaravelXhprof\\Middleware\\StartXhprof::class

然后进行访问即可，在/data/xhprof下面就会出现每次访问run\_id生成的文件

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/815cfcedde85c3e0f3fc45b01055a21a19886cf08d5f2248e888f79c1b1dd412?d=identicon)[zzh787272581](/maintainers/zzh787272581)

---

Top Contributors

[![zzh-coders](https://avatars.githubusercontent.com/u/6027395?v=4)](https://github.com/zzh-coders "zzh-coders (2 commits)")

### Embed Badge

![Health badge](/badges/zehua-laravel-xhprof/health.svg)

```
[![Health](https://phpackages.com/badges/zehua-laravel-xhprof/health.svg)](https://phpackages.com/packages/zehua-laravel-xhprof)
```

###  Alternatives

[symfony/stopwatch

Provides a way to profile code

2.8k387.2M918](/packages/symfony-stopwatch)[fruitcake/laravel-debugbar

PHP Debugbar integration for Laravel

19.1k662.9k29](/packages/fruitcake-laravel-debugbar)[spatie/ignition

A beautiful error page for PHP applications.

510147.6M69](/packages/spatie-ignition)[jokkedk/webgrind

Webgrind is a Xdebug profiling web frontend in PHP5. It implements a subset of the features of kcachegrind and installs in seconds and works on all platforms. For quick'n'dirty optimizations it does the job.

3.3k193.0k](/packages/jokkedk-webgrind)[koriym/printo

An object graph visualizer.

1421.8M2](/packages/koriym-printo)[soloterm/dumps

A Laravel command to intercept dumps from your Laravel application.

125285.7k3](/packages/soloterm-dumps)

PHPackages © 2026

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