Both MongoDB\Model\BSONDocument and MongoDB\Model\BSONArray extends the ArrayObject class. When one uses getArrayCopy on a document with nested documents / arrays these are not converted to arrays. Is this intended behavior?
This caused some issues for me when I wanted to encode a BSONDocument with nested documents/arrays as JSON:
As you can see the inner BSONArray is encoded as an object. I have worked around this with a function that recursively does getArrayCopy on all nested objects. I just thought I'd see if this behavior was intentional or not.