Is there anyway to determine how much memory a variable uses? I would like to compare a mysqli result resource to that resource loaded entirely into an array.