keys() public method

Get only the keys of current array.
public keys ( ) : ArrayObject
return ArrayObject An ArrayObject containing only the keys of current array.
Example #1
0
 /**
  * @dataProvider arraySet1
  */
 public function testKeys($array)
 {
     $a = new ArrayObject($array);
     $keys = $a->keys();
     $this->assertSame(array_keys($array), $keys->val());
 }