PHPackages                             appzcoder/phpcloc - 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. [CLI &amp; Console](/categories/cli)
4. /
5. appzcoder/phpcloc

ActiveLibrary[CLI &amp; Console](/categories/cli)

appzcoder/phpcloc
=================

Cloc &amp; duplicate code checker tool.

v0.0.2(7y ago)372.5k4MITPHPPHP &gt;=5.5.9

Since May 20Pushed 7y ago4 watchersCompare

[ Source](https://github.com/appzcoder/phpcloc)[ Packagist](https://packagist.org/packages/appzcoder/phpcloc)[ RSS](/packages/appzcoder-phpcloc/feed)WikiDiscussions develop Synced 1w ago

READMEChangelog (2)Dependencies (1)Versions (4)Used By (0)

PHPCloc
=======

[](#phpcloc)

🚀 Cloc &amp; duplicate code checker written in PHP

Requirements
------------

[](#requirements)

```
PHP >= 5.5.9

```

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

[](#installation)

### Manual

[](#manual)

```
$ wget https://github.com/appzcoder/phpcloc/releases/download/v0.0.2/phpcloc.phar -O phpcloc
// or
$ curl -L https://github.com/appzcoder/phpcloc/releases/download/v0.0.2/phpcloc.phar -o phpcloc

```

Then

```
$ sudo chmod a+x phpcloc
$ sudo mv phpcloc /usr/local/bin/phpcloc

```

### Composer

[](#composer)

```
$ composer global require appzcoder/phpcloc

```

Usage
-----

[](#usage)

### Cloc

[](#cloc)

```
$ phpcloc cloc .

```

[![cloc](https://user-images.githubusercontent.com/1708683/40279910-0c5d093e-5c6d-11e8-86e8-d78d59a4acbe.png)](https://user-images.githubusercontent.com/1708683/40279910-0c5d093e-5c6d-11e8-86e8-d78d59a4acbe.png)

### Duplicate code checker

[](#duplicate-code-checker)

```
$ phpcloc duplicate . --ext=php

```

[![duplicate](https://user-images.githubusercontent.com/1708683/40583089-056da3ea-61a9-11e8-95ca-e68504d86338.png)](https://user-images.githubusercontent.com/1708683/40583089-056da3ea-61a9-11e8-95ca-e68504d86338.png)

#### Available Commands

[](#available-commands)

```
$ phpcloc cloc directory --ext=php,js --exclude=vendor,node_modules

```

```
$ phpcloc duplicate directory --ext=php --exclude=vendor

```

Todo
----

[](#todo)

- Improve algorithm complexity
- Testing

Author
------

[](#author)

[Sohel Amin](http://sohelamin.com)

License
-------

[](#license)

This project is licensed under the MIT License - see the [License File](LICENSE) for details

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~6 days

Total

2

Last Release

2914d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/beed541009d742df2fff23fc2fc82af84b0decfa90439ba512c4d98b3d24c118?d=identicon)[appzcoder](/maintainers/appzcoder)

---

Top Contributors

[![sohelamin](https://avatars.githubusercontent.com/u/1708683?v=4)](https://github.com/sohelamin "sohelamin (12 commits)")

---

Tags

cloccode-duplicationconsoleduplicate-detectionphpphpcloccloccount lines of codeduplicate code checker

### Embed Badge

![Health badge](/badges/appzcoder-phpcloc/health.svg)

```
[![Health](https://phpackages.com/badges/appzcoder-phpcloc/health.svg)](https://phpackages.com/packages/appzcoder-phpcloc)
```

###  Alternatives

[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[crazywhalecc/static-php-cli

Build single static PHP binary, with PHP project together, with popular extensions included.

1.8k13.9k](/packages/crazywhalecc-static-php-cli)[matthiasnoback/symfony-console-form

Use Symfony forms for Console command input

368264.8k8](/packages/matthiasnoback-symfony-console-form)[phpcr/phpcr-shell

Shell for PHPCR

721.3M8](/packages/phpcr-phpcr-shell)[madewithlove/license-checker

CLI tool to verify allowed licenses for composer dependencies

54449.8k21](/packages/madewithlove-license-checker)[shel/neos-terminal

Neos CMS Ui terminal for running Eel expressions and other commands

1441.3k](/packages/shel-neos-terminal)

PHPackages © 2026

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