How to measure the number of lines of code in a project?

How can I measure the number of lines of code in my PHP web development projects?

Edit: I'm only interested in Windows tools

+6
php metrics
source share
5 answers

If you use a full-fledged IDE, the quick and dirty way is to count the number of "\ n" patterns using the search function (assuming it supports regular expressions)

-3
source share

Note CLOC , this is a line count of source code that supports many languages, I always recommend it.

It will distinguish between actual lines of code, empty lines or comments, which is very good.

In addition, there are a few more code counters you can check:

+23
source share

phploc

There is no experience if it works on Windows, but, but an Internet search has shown some results when people make it work on Windows.

+3
source share

If you are in a linux box, the easiest way is probably directed by this SO question:

counting (non-empty) lines of code in bash

+1
source share

Our SD Source Code Search Engine is a graphical interface for searching large bodies of source code, such as on the PHP website. This is fast because it pre-indexes the source code.

As a side effect of the indexing process, it also calculates metrics based on source code, including SLOC, comments, blank lines, Cyclomatic and Halsted complexity numbers.

And it works on Windows.

0
source share

All Articles