PHPackages                             jackdou/php-fmt - 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. jackdou/php-fmt

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

jackdou/php-fmt
===============

php smart format script

v1.1(7y ago)216MITPHPPHP &gt;=7.0

Since Dec 26Pushed 7y ago1 watchersCompare

[ Source](https://github.com/jhabc1314/php-fmt)[ Packagist](https://packagist.org/packages/jackdou/php-fmt)[ RSS](/packages/jackdou-php-fmt/feed)WikiDiscussions master Synced 2mo ago

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

php-fmt
=======

[](#php-fmt)

`php` 代码格式化工具， 基于 [php-parser 4,x](https://github.com/nikic/PHP-Parser)， 可以批量快速美化代码

目前只支持 `php7.0` 以上版本

安装
==

[](#安装)

- 本地确保已经安装 [composer](https://www.phpcomposer.com/)， 推荐使用 [中国镜像](https://pkg.phpcomposer.com/)
- 可以在任意目录下执行命令 `composer global require jackdou/php-fmt`
- 确保 `composer` 下的 `vendor/bin` 目录已经添加到系统环境变量
- 在任意目录执行 `php-fmt` 命令，可以执行则安装成功

使用
==

[](#使用)

- 进入需要美化的代码目录
- 执行命令 `php-fmt` 会自动美化所有 `php` 的脚本文件
- 如只想美化指定文件，执行 `php-fmt yourfilename.php` 即可

说明
==

[](#说明)

- `php-fmt` 使用了缓存功能，当一个文件在上一次美化后没有任何修改记录则执行命令后会自动跳过， 加快命令执行速度
- 感谢 `php-parser`
- 有任何方面的问题可以提交 `issues`，感谢

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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 ~0 days

Total

2

Last Release

2697d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8ad3995ba32d2f1b072d7d3d2e6837ae9339d74c0c79df06cb1de7cf984eecc5?d=identicon)[SuperHeng](/maintainers/SuperHeng)

---

Top Contributors

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

---

Tags

formatphp7

### Embed Badge

![Health badge](/badges/jackdou-php-fmt/health.svg)

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

###  Alternatives

[symfony/maker-bundle

Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code.

3.4k111.1M568](/packages/symfony-maker-bundle)[roave/backward-compatibility-check

Tool to compare two revisions of a public API to check for BC breaks

5953.3M56](/packages/roave-backward-compatibility-check)[coenjacobs/mozart

Composes all dependencies as a package inside a WordPress plugin

4723.6M20](/packages/coenjacobs-mozart)[psalm/plugin-laravel

Psalm plugin for Laravel

3274.9M308](/packages/psalm-plugin-laravel)[recca0120/laravel-erd

Laravel ERD automatically generates Entity-Relationship Diagrams from your Laravel models and displays them using Vuerd.

36072.0k](/packages/recca0120-laravel-erd)[ondrejmirtes/better-reflection

Better Reflection - an improved code reflection API

136.2M4](/packages/ondrejmirtes-better-reflection)

PHPackages © 2026

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