Everything goes the same. Overwriting the “old” array with NOTHING new will cause the old array (eventually) to receive garbage collected and removed from the system. Do you do this in two steps:
unset($arr); // force delete old array $arr = []; // create new array
or simply
$arr = []; // replace old array with new empty one
basically comes down to the same thing: the old array will eventually be cleared.
source share