How big is my PHP Project ?

In: PHP| Programming language

18 Mar 2009

I had the chance to attend the PHP Qu├ębec Conference this year. It was very interesting. I highly encourage anyone to attend such conferences if he / she is interested by PHP.

Anyway during one of the presentation, I discovered an interesting little script / tool named PHPLoc. It is written by Sebastian Bergmann and It will basically parse php files (of a project for intstance) and return some informations related to its size.

Here is an example directly taken from :

sb@ubuntu ~ % phploc /usr/local/src/ezcomponents/trunk/Workflow
phploc 1.1.0 by Sebastian Bergmann.

Directories: 13
Files: 102

Lines of Code (LOC): 14066
Executable Lines of Code (ELOC): 5710
Comment Lines of Code (CLOC): 5228
Non-Comment Lines of Code (NCLOC): 8838

Interfaces: 7
Classes: 90
Functions/Methods: 566

  • Digg
  • Facebook
  • Mixx
  • Google Bookmarks

Comment Form

Who am I?

My name is Bashar Al-Fallouji, I work as a Enterprise Solutions Architect at Amazon Web Services (Sydney, Australia).

I am particularly interested in Cloud Computing, Web applications, Open Source Development, Software Engineering, Information Architecture, Unit Testing, XP/Agile development, etc.

On this blog, you will find mostly technical articles and thoughts around PHP, OOP, OOD, Unit Testing, etc. I am also sharing a few open source tools and scripts.

  • dipan: Hi Bashar It's really awesome that you wrote this code. IT'll save tones of time of all developer. [...]
  • Bashar: Glad that you liked it ! [...]
  • Angel S. Moreno: well, there goes wasting a couple of hours of development and a couple of days of testing. I owe you [...]
  • Bashar: Thats right, the setSaveFile create a files containing an associative array of classname => filen [...]
  • Loggy: Jim's clarification in particular was pretty useful although I did have to dig down into the tree to [...]