Ejemplo n.º 1
0
 public function test_select_2()
 {
     // Destructive
     $arr = range(1, 3);
     Enumerator::select_($arr, function ($key, &$value) {
         $value *= 2;
         return true;
     });
     $this->assertEquals(array(2, 4, 6), $arr);
 }