PHPBench
php-var-sizeof
Our great sponsors
PHPBench | php-var-sizeof | |
---|---|---|
3 | 3 | |
1,839 | 56 | |
0.5% | - | |
8.0 | 0.0 | |
14 days ago | over 1 year ago | |
PHP | PHP | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
PHPBench
-
I've been loving Benchmarking lately, but the Framework does this one quirky thing with the first result of a set. Specifically, the first return is always unusually high.
That was my first thought too. I used https://github.com/phpbench/phpbench in the past and it has a warmup feature where the code will run a couple times before the real benchmarking start
-
Comparing PHP Collections
I used phpbench to measure performance. I think one of the big differences between all the solutions is the type checking. So I decided to try measure it. How much faster will code with/without type checking?
-
Benchmark: Mezon Router is up to 196 tomes faster then Hoa Router
use phpbench
php-var-sizeof
-
Comparing PHP Collections
Memory test is very simple. It creates $collection and puts Item objects into it count times. For measurement I use var_sizeof() and memory_get_usage().
-
I made my own var_sizeof() function with FFI to calculate variable size more accurate
I used this scrip to render a table with numbers https://github.com/mrsuh/php-var-sizeof/blob/master/bin/render-table.php
What are some alternatives?
xDebug - Xdebug — Step Debugger and Debugging Aid for PHP
php-generics - PHP generics written in PHP
XHProf - XHProf is a function-level hierarchical profiler for PHP and has a simple HTML based user interface.
PHP Debug Bar - Debug bar for PHP
Tracy - 😎 Tracy: the addictive tool to ease debugging PHP code for cool developers. Friendly design, logging, profiler, advanced features like debugging AJAX calls or CLI support. You will love it.
Dontbug Debugger
Barbushin PHP Console - Handle PHP errors, dump variables, execute PHP code remotely in Google Chrome
APM - PHP APM (Alternative PHP Monitor)
Kint - Kint - a powerful and modern PHP debugging tool.
PHPDBG
Dephpugger - Php Debugger to run in terminal to debug your code easily.
PHP Console - PHP Debug Console