findKey() public static method

Finds a value in the given data and returns its key.
public static findKey ( array $data, callable $cb, mixed $default = null ) : integer | string
$data array Data.
$cb callable Function to find value.
$default mixed Default value.
return integer | string Key.
 /**
  *
  */
 public function testFindKeyDefault()
 {
     $this->assertEquals('default', Traverse::findKey([], new Identity(), 'default'));
 }