public function test_reverse_collect_2() { // Test destruction $arr = array(1, 2, 3); $index = 2; $that = $this; Enumerator::reverse_collect_($arr, function ($key, &$value) use(&$index, &$that) { $that->assertEquals($index--, $key); return; }); }