PHPBench can be installed either as dependency for your project or as a global package.
Install as a PHAR package¶
$ curl -o phpbench.phar https://phpbench.github.io/phpbench/phpbench.phar $ curl -o phpbench.phar.pubkey https://phpbench.github.io/phpbench/phpbench.phar.pubkey
You will probably then want make it executable and put it in your systems global path, on Linux systems:
$ chmod 0755 phpbench.phar $ sudo mv phpbench.phar /usr/local/bin/phpbench $ sudo mv phpbench.phar.pubkey /usr/local/bin/phpbench.pubkey
You can update the version at any time by using the
$ phpbench self-update
PHPBench is unstable, installing as a PHAR will means that you are always updating to the latest version, the latest version may include BC breaks. Therefore it is recommended to include the package as a project dependency for continuous-integration.
To install PHPBench as a dependency of your project:
$ composer require phpbench/phpbench @dev --dev
You may then run PHPBench from your project’s directory as follows: