original_string: protected function varExport($var, $indent = '')
      {
          switch (gettype($var)) {
  
              case 'string':
                  return '"'.addcslashes($var, "\\\$\"\r\n\t\v\f").'"';
  
              case 'array':
                  $indexed = array_keys($var) === range(0, count($var) - 1);
  
                  $r = [];
  
                  foreach ($var as $key => $value) {
                      $r[] = "$indent    "
                          .($indexed ? '' : $this->varExport($key).' => ')
                          .$this->varExport($value, "{$indent}    ");
                  }
  
                  return "[\n".implode(",\n", $r)."\n".$indent.']';
  
              case 'boolean':
                  return $var ? 'true' : 'false';
  
              case 'integer':
              case 'double':
                  return $var;
  
              default:
                  return var_export($var, true);
          }
      }
code: protected function varExport($var, $indent = '')
      {
          switch (gettype($var)) {
  
              case 'string':
                  return '"'.addcslashes($var, "\\\$\"\r\n\t\v\f").'"';
  
              case 'array':
                  $indexed = array_keys($var) === range(0, count($var) - 1);
  
                  $r = [];
  
                  foreach ($var as $key => $value) {
                      $r[] = "$indent    "
                          .($indexed ? '' : $this->varExport($key).' => ')
                          .$this->varExport($value, "{$indent}    ");
                  }
  
                  return "[\n".implode(",\n", $r)."\n".$indent.']';
  
              case 'boolean':
                  return $var ? 'true' : 'false';
  
              case 'integer':
              case 'double':
                  return $var;
  
              default:
                  return var_export($var, true);
          }
      }
code_tokens: protected function varExport ( $ var , $ indent = '' ) { switch ( gettype ( $ var ) ) { case 'string' : return '"' . addcslashes ( $ var , "\\\$\"\r\n\t\v\f" ) . '"' ; case 'array' : $ indexed = array_keys ( $ var ) === range ( 0 , count ( $ var ) - 1 ) ; $ r = [ ] ; foreach ( $ var as $ key => $ value ) { $ r [ ] = "$indent    " . ( $ indexed ? '' : $ this -> varExport ( $ key ) . ' => ' ) . $ this -> varExport ( $ value , "{$indent}    " ) ; } return "[\n" . implode ( ",\n" , $ r ) . "\n" . $ indent . ']' ; case 'boolean' : return $ var ? 'true' : 'false' ; case 'integer' : case 'double' : return $ var ; default : return var_export ( $ var , true ) ; } }
docstring: Custom var_export for correct work with \r\n.
  
  @param $var
  @param string $indent
  
  @return string
docstring_tokens: Custom var_export for correct work with \ r \ n .