Is there a difference between casting to an array and using this function?
For instance, if we have:
$arrayObject = new ArrayObject([1, 2, 3]);
Is there a difference between these:
$array = (array) $arrayObject;
vs
$array = $arrayObject->getArrayCopy();
If not, is there any scenario where they would produce different results, or do they produce the result in different ways?