summaryrefslogtreecommitdiff
path: root/Zend/tests/memory_get_peak_usage.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/memory_get_peak_usage.phpt')
-rw-r--r--Zend/tests/memory_get_peak_usage.phpt26
1 files changed, 26 insertions, 0 deletions
diff --git a/Zend/tests/memory_get_peak_usage.phpt b/Zend/tests/memory_get_peak_usage.phpt
new file mode 100644
index 0000000000..aeca951304
--- /dev/null
+++ b/Zend/tests/memory_get_peak_usage.phpt
@@ -0,0 +1,26 @@
+--TEST--
+int memory_get_peak_usage ([ bool $real_usage = false ] );
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br> - #phparty7 - @phpsp - novatec/2015 - sao paulo - br
+--SKIPIF--
+<?php
+$zend_mm_enabled = getenv("USE_ZEND_ALLOC");
+if ($zend_mm_enabled === "0") {
+ die("skip Zend MM disabled");
+}
+?>
+--INI--
+memory_limit=-1
+--FILE--
+<?php
+var_dump($a = memory_get_peak_usage());
+var_dump(memory_get_peak_usage(true));
+var_dump(memory_get_peak_usage(false));
+$array = range(1,1024*1024);
+var_dump(memory_get_peak_usage() > $a);
+?>
+--EXPECTF--
+int(%d)
+int(%d)
+int(%d)
+bool(true)