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 2d 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 41% 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

2744d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/23138918?v=4)[柚子](/maintainers/SuperHeng)[@superheng](https://github.com/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

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M341](/packages/psalm-plugin-laravel)[deptrac/deptrac

Deptrac is a static code analysis tool that helps to enforce rules for dependencies between software layers.

3.0k8.8M107](/packages/deptrac-deptrac)[roave/backward-compatibility-check

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

6003.7M96](/packages/roave-backward-compatibility-check)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k13](/packages/tempest-framework)[coenjacobs/mozart

Composes all dependencies as a package inside a WordPress plugin

4814.0M24](/packages/coenjacobs-mozart)[v.chetkov/php-clean-architecture

PHP Clean Architecture

14659.9k](/packages/vchetkov-php-clean-architecture)

PHPackages © 2026

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