PHPackages                             netsilik/lines-of-code-counter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. netsilik/lines-of-code-counter

ActiveProject[Utility &amp; Helpers](/categories/utility)

netsilik/lines-of-code-counter
==============================

Standalone utility script for Counting Lines of Code.

08PHP

Since Sep 2Pushed 6y ago1 watchersCompare

[ Source](https://github.com/Netsilik/LinesOfCodeCounter)[ Packagist](https://packagist.org/packages/netsilik/lines-of-code-counter)[ RSS](/packages/netsilik-lines-of-code-counter/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Lines of Code counter
=====================

[](#lines-of-code-counter)

Simple utility script for Counting Lines of Code.

---

European Union Public Licence, v. 1.2

Unless required by applicable law or agreed to in writing, software distributed under the Licence is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

Contact:
Latest version available at:

Installation
------------

[](#installation)

```
composer require netsilik/lines-of-code-counter

```

Usage
-----

[](#usage)

Lince of Code counter is a command line scipt:

```
Usage: loc [OPTION]... DIRECTORY...
Count the lines of code in the files in the specified DIRECTORY(ies).

Mandatory arguments to long options are mandatory for short options too.
  -f, --file-mask              Process only files that match the file mask
      --help                   Display this help and exit
  -i, --ignore-dir=DIRECTORY   Ignore all files in the directory DIRECTORY
  -r, --recursive              Recursively process filse in sub-directories
      --version                Output version information and exit
```

Count the lines of code in all `php` files in the current directory and all subdirectories:

```
$ loc -rf *.php .

Parsed 11 (*.php) files out of a total of 29 files, in 12 directories and counted:
  1,051 total lines,
    157 empty lines,
    734 lines of code,
    108 comment lines,
    109 comments in total.
```

Count the lines of code in all `php` files in the src directory:

```
$ loc -f *.php src

Parsed 1 (*.php) file out of a total of 1 file, in 1 directory and counted:
  331 total lines,
   53 empty lines,
  247 lines of code,
   18 comment lines,
   18 comments in total.
```

Count the lines of code in all `php` and `html` files in the current directory and all subdirectories, excluding the vendor directory:

```
$ loc -rf *.php,*.html -i vendor .

Parsed 7 (*.php, *.html) files out of a total of 16 files, in 6 directories and counted:
  1,466 total lines,
    108 empty lines,
  1,322 lines of code,
     23 comment lines,
     33 comments in total.
```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/90d507c4b8102af88517672375ad0777056f35baecaf2ea94dbc7b7c2e7c5512?d=identicon)[Jacco-V](/maintainers/Jacco-V)

---

Top Contributors

[![Jacco-V](https://avatars.githubusercontent.com/u/19333579?v=4)](https://github.com/Jacco-V "Jacco-V (10 commits)")

### Embed Badge

![Health badge](/badges/netsilik-lines-of-code-counter/health.svg)

```
[![Health](https://phpackages.com/badges/netsilik-lines-of-code-counter/health.svg)](https://phpackages.com/packages/netsilik-lines-of-code-counter)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
