First version of #25 implementation, providing memory_get_usage/memory_get_peak_usage/memory_limit
All checks were successful
The build was successful.

This commit is contained in:
2018-08-09 07:37:56 +00:00
parent 8f7fc71027
commit 22e31a707a
10 changed files with 152 additions and 26 deletions

19
tests/memory_usage.aer Normal file
View File

@@ -0,0 +1,19 @@
class Main {
public function __construct() {
$this->displayMem();
}
private function displayMem() {
$bytes = memory_get_usage();
$peak = memory_get_peak_usage();
$limit = memory_limit();
var_export($bytes > 0);
var_export($peak > 0);
var_export($peak >= $bytes);
var_export($limit == 0 || $limit > $bytes);
}
}
new Main();

4
tests/memory_usage.exp Normal file
View File

@@ -0,0 +1,4 @@
TRUE
TRUE
TRUE
TRUE