PHPLOC

(( gitHubWatchers )) (( gitHubStars )) (( gitHubForks ))

PHPLOC is a tool for quickly measuring the size and analyzing the structure of a PHP project.

Installation

Install from a Composer package as a dev dependency (with Composer)

Make sure you have Composer installed.

Require it as a dev dependency:
composer require --dev phploc/phploc
Run it:
php vendor/bin/phploc

Install from a PHP Archive (with curl or wget)

The PHPUnit documentation has a clear manual on how to install PHARs on Windows.

If you have the Suhosin extension enabled, make sure to allow the execution of PHARs in your php.ini:
suhosin.executor.include.whitelist = phar

Locally

Download it:
wget -O phploc.phar https://phar.phpunit.de/phploc.phar
or
curl -sSL https://phar.phpunit.de/phploc.phar -o phploc.phar
Use it:
php phploc.phar

Globally

Download it:
wget -O phploc.phar https://phar.phpunit.de/phploc.phar
or
curl -sSL https://phar.phpunit.de/phploc.phar -o phploc.phar
Install it as an executable:
chmod a+x phploc.phar
sudo mv phploc.phar /usr/local/bin/phploc
Use it:
phploc