get() public static method

Returns the value at the given path.
See also: splitPath()
public static get ( array $data, array | string $path, mixed $default = null ) : mixed
$data array Data.
$path array | string Path.
$default mixed Default value.
return mixed Value.
 /**
  *
  */
 public function testGet()
 {
     $data = ['a' => 1, 'b' => ['c' => 2, 'd' => ['e' => 3]]];
     $this->assertNull(Access::get($data, 'a.b.c'));
     $this->assertEquals(1, Access::get($data, 'a'));
     $this->assertEquals(3, Access::get($data, 'b.d.e'));
     $this->assertEquals('z', Access::get($data, 'a.b.c', 'z'));
 }