function test(){
echo memory_get_usage(), '<br>';
$start = memory_get_usage();
$a = [];
for ($i = 0; $i < 1000; $i++) {
$a[$i] = $i + $i;
}
$mid = memory_get_usage();
echo memory_get_usage(), '<br>';
for ($i = 1000; $i < 2000; $i++) {
$a[$i] = $i + $i;
}
$end = memory_get_usage();
echo memory_get_usage(), '<br>';
echo 'argv:', ($mid - $start) / 1000, 'bytes', '<br>';
echo 'argv:', ($end - $mid) / 1000, 'bytes', '<br>';
echo 'Memory:', ($mid - $start) / 1024, 'k', '<br>';
echo 'Memory:', ($end - $mid) / 1024, 'k', '<br>';
}