1--TEST-- 2void memory_reset_peak_usage(); 3--SKIPIF-- 4<?php 5if (getenv("USE_ZEND_ALLOC") === "0") { 6 die("skip Zend MM disabled"); 7} 8?> 9--INI-- 10memory_limit=-1 11--FILE-- 12<?php 13$array0 = range(1, 1024 * 1024); 14$m0 = memory_get_peak_usage(); 15$array1 = range(1, 1024 * 1024); 16var_dump(($m1 = memory_get_peak_usage()) > $m0); 17unset($array0, $array1); 18memory_reset_peak_usage(); 19var_dump(memory_get_peak_usage() < $m1); 20?> 21--EXPECT-- 22bool(true) 23bool(true) 24