code: protected function substitutionAsString($val)
      {
          $type = $this->debug->abstracter->getType($val);
          if ($type == 'array') {
              $count = \count($val);
              $val = 'array('.$count.')';
          } elseif ($type == 'object') {
              $val = $val['className'];
          } else {
              $val = $this->dump($val);
          }
          return $val;
      }
docs: Cooerce value to string
  
  @param mixed $val value
  
  @return string