PHPackages                             smuuf/phpcb - 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. smuuf/phpcb

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

smuuf/phpcb
===========

PHP Code Benchmark

0.5.2(4y ago)74.3k↓75%1PHPPHP &gt;=7.4

Since Jun 7Pushed 4y ago3 watchersCompare

[ Source](https://github.com/smuuf/phpcb)[ Packagist](https://packagist.org/packages/smuuf/phpcb)[ RSS](/packages/smuuf-phpcb/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (1)

[![PHP tests](https://github.com/smuuf/phpcb/actions/workflows/php.yml/badge.svg)](https://github.com/smuuf/phpcb/actions/workflows/php.yml)

phpcb (php code benchmark)
==========================

[](#phpcb-php-code-benchmark)

**phpcb** is a very simple and very lightweight tool for speed benchmarking of various little pieces of PHP code, written in PHP, of course.

### Why

[](#why)

**phpcb** is meant to be used in those situations when there are multiple ways of how to do something - and you *know* all will have the exact same result - but you ***just can't*** decide which would ultimately be the best (meaning "*fastest*") to use.

### Requirements

[](#requirements)

- PHP 7.4+
- *BCMath Arbitrary Precision Mathematics* library for PHP; shouldn't be a problem, since it is commonly shipped with PHP itself.

### Installation

[](#installation)

```
composer require --dev smuuf/-hpcb

```

### Usage

[](#usage)

Write your microbenchmarks in a some file. For example `mymicrobench.php` *(here placed in phpcb's root directory, so it's clear we rquire Composer's autoload file from correct place)*:

```
