firstKey() 공개 메소드

Evaluate an expression and return the first key
public firstKey ( ) : mixed
리턴 mixed
예제 #1
0
 public function testFirstKey()
 {
     // Array test for array
     $jsonPath = new JSONPath(array('a' => 'A', 'b', 'B'));
     $firstKey = $jsonPath->firstKey();
     $this->assertEquals('a', $firstKey);
     // Array test for object
     $jsonPath = new JSONPath((object) array('a' => 'A', 'b', 'B'));
     $firstKey = $jsonPath->firstKey();
     $this->assertEquals('a', $firstKey);
 }