- Copying or copying?
<?php
echo memory_get_usage(), "\n"; // 14776
$a = array();
for ($i = 0; $i < 250; $i++) {
$a[] = range($i, $i + 250);
}
unset($i);
echo memory_get_usage(), "\n"; // 3809864
$b = $a;
echo memory_get_usage(), "\n";
$b[5] = range(0, 250);
echo memory_get_usage(), "\n";
?>