Size of phpDocumentor

I was going to use this as an introduction to my overview post but it seems my lack of shell scripting made things a little harder then I thought.

Anyhow if you don’t count html or compiled templates the 1.2.0 branch of phpDocumentor (these is where 1.3.0x lives), contains 69,847 lines of code. If you add in the documentation that Greg has written were up to 75,257 lines.

Thanks to my co-worker Charles for helping me out.

And the code I ended up using is:
cat `find * | egrep "php$|inc$" | egrep -v "templates_c"` |wc -l

I ended up including ini files and html files and removing the embedded Smarty and Html Tree menu, for maybe a more accurate count.
Without ini files: 60,322
With ini files: 70,335

3 thoughts on “Size of phpDocumentor”

  1. My inital though is that wc -l just counts lines, so you are including comments along with actual code. I googled a bit for a quick tool to just parse out lines of code in php files and ran accross a tool called SLOCCount ( There was a portage build script for it, so I ran it on my phpdocumentor-1.3.0rc3/ direcorty with these results:

    SLOC Directory SLOC-by-Language (Sorted)
    70488 phpDocumentor php=70442,pascal=46
    663 docbuilder php=663
    661 Documentation php=661
    457 scripts php=446,sh=11
    296 top_dir php=248,sh=48
    198 HTML_TreeMenu-1.1.2 php=198
    102 tutorials php=102
    0 media (none)
    0 user (none)

    Totals grouped by language (dominant language first):
    php: 72760 (99.86%)
    sh: 59 (0.08%)
    pascal: 46 (0.06%)

    Total Physical Source Lines of Code (SLOC) = 72,865
    Development Effort Estimate, Person-Years (Person-Months) = 18.06 (216.70)
    (Basic COCOMO model, Person-Months = 2.4 * (KSLOC**1.05))
    Schedule Estimate, Years (Months) = 1.61 (19.30)
    (Basic COCOMO model, Months = 2.5 * (person-months**0.38))
    Estimated Average Number of Developers (Effort/Schedule) = 11.23
    Total Estimated Cost to Develop = $ 2,439,420
    (average salary = $56,286/year, overhead = 2.40).
    SLOCCount is Open Source Software/Free Software, licensed under the FSF GPL.
    Please credit this data as “generated using David A. Wheeler’s ‘SLOCCount’.”

    Looks to me like this might be including comments also however 🙁

  2. Pingback: Jason E. Sweat's weblog

  3. Pingback: Observations from a Tech Architect: Enterprise Implementation Issues & Solutions

Comments are closed.