Prevent ArrayObject recursion in 5.6
Merge branch 'hotfix/#6096-prevent-php-5.6-arrayobject-infinite-recursion'

Close #6096