# If you have composer installed system wide
composer global require phpunit/phpunit # set PHPUnit as a global dependency
phpunit --version # show installed version number
# If you have the .phar file of composer
php composer.phar global require phpunit/phpunit # set PHPUnit as a global dependency
phpunit --version # show installed version number
# If you have composer installed system wide
composer require phpunit/phpunit # set PHPUnit as a local dependency
./vendor/bin/phpunit --version # show installed version number
# If you have the .phar file of composer
php composer.phar require phpunit/phpunit # set PHPUnit as a local dependency
./vendor/bin/phpunit --version # show installed version number