1--TEST--
2Dumping an ArrayObject while it is being sorted
3--FILE--
4<?php
5
6$ao = new ArrayObject([1, 2, 3]);
7$i = 0;
8$ao->uasort(function($a, $b) use ($ao, &$i) {
9    if ($i++ == 0) {
10        var_dump($ao);
11    }
12    return $a <=> $b;
13});
14
15?>
16--EXPECT--
17object(ArrayObject)#1 (1) {
18  ["storage":"ArrayObject":private]=>
19  array(3) {
20    [0]=>
21    int(1)
22    [1]=>
23    int(2)
24    [2]=>
25    int(3)
26  }
27}
28