Do you really know how your PHP project consumes the memory ? If the answer is no, you should consider using PHP Meminfo
.
PHP Meminfo is a PHP extension that gives you insights on the PHP memory content. Its main goal is to help you understand memory leaks: by looking at data present in memory, you can better understand your application behaviour.
The version 1.0.0 just released with PHP 7 support, more complete and better documentation.
If you are a macOS user and you use Homebrew
as package manager, you can install the extension easily, as a package exists for each compatible PHP version.