search
Homephp教程php手册php格式化工具Beautify PHP小小BUG

Beautify PHP,很好用的php格式化工具
http://www.bierkandt.org/beautify/
http://pear.php.net/package/PHP_Beautifier/download

最近组内来新人,他们代码不太规范的时候看得实在不舒服

这个工具实在很好用,再乱的代码瞬间就格式化好了

丢到linux下还可以快速批量处理@.@

好了,以下是本帖主题:

Beautify PHP格式化符号时,遗漏了^=和&=判断,

在beautify_php.class.inc第426行,增加这两个符号

                       // add space before chars = 
                        if ($i > 0 AND !$this->_comment) {
                            if (($a[$i] == "=" OR $a[$i] == "" OR $a[$i] == "*")
                                AND preg_match("/([ |!|=|.||-|+|*|/|^|&]+)/", $a[$i-1]) == 0) {
                                $this->_outstr  = rtrim($this->_outstr)." ";
                            }
                        }

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function