code: private static function printPath(?array $path = null)
      {
          $pathStr     = '';
          $currentPath = $path;
          while ($currentPath) {
              $pathStr     =
                  (is_string($currentPath['key'])
                      ? '.' . $currentPath['key']
                      : '[' . $currentPath['key'] . ']') . $pathStr;
              $currentPath = $currentPath['prev'];
          }
  
          return $pathStr ? 'value' . $pathStr : '';
      }
docs: Build a string describing the path into the value where the error was found
  
  @param mixed[]|null $path
  
  @return string