1. Go to this page and download the library: Download bert-w/memory-usage library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
(new \BertW\MemoryUsage\MemoryUsage)->usedMemory();
(new \BertW\MemoryUsage\MemoryUsage)->totalUsedMemory();
(new \BertW\MemoryUsage\MemoryUsage)->totalMemory();
(new \BertW\MemoryUsage\MemoryUsage)->cacheMemory();
(new \BertW\MemoryUsage\MemoryUsage)->nonCacheMemory();
(new \BertW\MemoryUsage\MemoryUsage)->swapMemory();
(new \BertW\MemoryUsage\MemoryUsage)->bufferMemory();
(new \BertW\MemoryUsage\MemoryUsage)->meminfo();
// Returns Array<string, int> with parsed `/proc/meminfo` content (in kilobytes).
(new \BertW\MemoryUsage\MemoryUsage)->get(\BertW\MemoryUsage\Meminfo::Buffers);
(new \BertW\MemoryUsage\MemoryUsage)->get('Buffers');
// Retrieve any value from the `/proc/meminfo` file. Accepts strings and Enums.
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.