UBench alternatives and similar libraries
Based on the "Code Analysis" category.
Alternatively, view UBench alternatives based on common mentions on social networks and blogs.
-
phan
Phan is a static analyzer for PHP. Phan prefers to avoid false-positives and attempts to prove incorrectness rather than correctness. -
Code Climate
DISCONTINUED. Multi-language code linter, auto-formatter, and security scanner [Moved to: https://github.com/qltysh/qlty] -
PHP Mess Detector
PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD. PHPMD can be seen as an user friendly frontend application for the raw metrics stream measured by PHP Depend. -
Better Reflection
:crystal_ball: Better Reflection is a reflection API that aims to improve and provide more features than PHP's built-in reflection API. -
PHP Code Sniffer
PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards. -
PHP Semantic Versioning Checker
Compares two source sets and determines the appropriate semantic versioning to apply. -
PHPCheckstyle
PHPCheckstyle is an open-source tool that helps PHP programmers adhere to certain coding conventions.
CodeRabbit: AI Code Reviews for Developers

* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of UBench or a related project?
README
Ubench 
Ubench is a PHP micro library for benchmark
Installation
Note: If you are looking for this package for laravel application then install it from here Benchmark
Old school
require src/Ubench.php
in your project.
Composer
Add this to your composer.json
{
"require": {
"devster/ubench": "~2.0.0"
}
}
Usage
require_once 'src/Ubench.php';
$bench = new Ubench;
$bench->start();
// Execute some code
$bench->end();
// Get elapsed time and memory
echo $bench->getTime(); // 156ms or 1.123s
echo $bench->getTime(true); // elapsed microtime in float
echo $bench->getTime(false, '%d%s'); // 156ms or 1s
echo $bench->getMemoryPeak(); // 152B or 90.00Kb or 15.23Mb
echo $bench->getMemoryPeak(true); // memory peak in bytes
echo $bench->getMemoryPeak(false, '%.3f%s'); // 152B or 90.152Kb or 15.234Mb
// Returns the memory usage at the end mark
echo $bench->getMemoryUsage(); // 152B or 90.00Kb or 15.23Mb
// Runs `Ubench::start()` and `Ubench::end()` around a callable
// Accepts a callable as the first parameter. Any additional parameters will be passed to the callable.
$result = $bench->run(function ($x) {
return $x;
}, 1);
echo $bench->getTime();
License
Ubench is licensed under the MIT License
*Note that all licence references and agreements mentioned in the UBench README section above
are relevant to that project's source code only.