我如何自动化PHP源代码的格式? [英] How do I automate the formatting of PHP source?

查看:131
本文介绍了我如何自动化PHP源代码的格式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我已经带来了对工作的一大十岁上下的PHP项目(数百个文件)和源格式一直没有从一开始就非常一致。现在我愿意回答大家的所有源,并根据Zend框架编码标准格式化(制表符为空格,短标签完整的PHP标签,正确缩进等),然而,这是不是可以手工完成的工作。我怎么能自动完成这一过程?

I have a large-ish PHP project (hundreds of files) that I've been brought in to work on and the source formatting hasn't been very consistent from the beginning. I'd now like to take all source and format it according to the Zend Framework coding standards (tabs to spaces, short tags to full php tags, correct indenting, etc.), however this is not a job that can be done manually. How can I automate this process?

推荐答案

尝试搜索PHP code美化。有PHP codeBeautifier,PHP_Beautifier(梨)和PHPED带有PolyStyle。

Try searching for php code beautifiers. There's phpCodeBeautifier, PHP_Beautifier (PEAR) and PHPed comes with PolyStyle.

这篇关于我如何自动化PHP源代码的格式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆