在PHP项目中计数行 [英] count lines in a PHP project

查看:120
本文介绍了在PHP项目中计数行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您知道任何可以计算PHP项目中所有代码行的工具吗?

Do you know any tool which can count all the code lines from a PHP project?

推荐答案

在POSIX操作系统(例如Linux或OS X),您可以将以下内容写入Bash shell:

On a POSIX operating system (e.g. Linux or OS X) you can write the following into your Bash shell:

wc -l `find . -iname "*.php"`

这将计算当前所有php文件中的行目录和子目录。 (请注意,这些单引号是反引号,而不是实际的单引号)

This will count the lines in all php-files in the current directory and also subdirectories. (Note that those single 'quotes' are backticks, not actual single quotes)

这篇关于在PHP项目中计数行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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