code: protected function substitutionAsString($val)
      {
          $type = $this->debug->abstracter->getType($val);
          if ($type == 'string') {
              $val = $this->dump($val, true, false);
          } elseif ($type == 'array') {
              $count = \count($val);
              $val = '<span class="t_keyword">array</span>'
                  .'<span class="t_punct">(</span>'.$count.'<span class="t_punct">)</span>';
          } elseif ($type == 'object') {
              $val = $this->markupClassname($val['className']);
          } else {
              $val = $this->dump($val);
          }
          return $val;
      }
docs: Cooerce value to string
  
  @param mixed $val value
  
  @return string