if I unset an array, would its elements be garbage collected or freed up assuming they are not referenced in anywhere else? what if I simply do $array =new array();
The following will modify the array itself and leave it empty:
array_splice($myArray, 0);
And the Splice Documentation