original_string: public function dump(Data $data, $output = null)
      {
          $this->decimalPoint = localeconv();
          $this->decimalPoint = $this->decimalPoint['decimal_point'];
  
          if ($locale = $this->flags & (self::DUMP_COMMA_SEPARATOR | self::DUMP_TRAILING_COMMA) ? setlocale(LC_NUMERIC, 0) : null) {
              setlocale(LC_NUMERIC, 'C');
          }
  
          if ($returnDump = true === $output) {
              $output = fopen('php://memory', 'r+b');
          }
          if ($output) {
              $prevOutput = $this->setOutput($output);
          }
          try {
              $data->dump($this);
              $this->dumpLine(-1);
  
              if ($returnDump) {
                  $result = stream_get_contents($output, -1, 0);
                  fclose($output);
  
                  return $result;
              }
          } finally {
              if ($output) {
                  $this->setOutput($prevOutput);
              }
              if ($locale) {
                  setlocale(LC_NUMERIC, $locale);
              }
          }
      }
code: public function dump(Data $data, $output = null)
      {
          $this->decimalPoint = localeconv();
          $this->decimalPoint = $this->decimalPoint['decimal_point'];
  
          if ($locale = $this->flags & (self::DUMP_COMMA_SEPARATOR | self::DUMP_TRAILING_COMMA) ? setlocale(LC_NUMERIC, 0) : null) {
              setlocale(LC_NUMERIC, 'C');
          }
  
          if ($returnDump = true === $output) {
              $output = fopen('php://memory', 'r+b');
          }
          if ($output) {
              $prevOutput = $this->setOutput($output);
          }
          try {
              $data->dump($this);
              $this->dumpLine(-1);
  
              if ($returnDump) {
                  $result = stream_get_contents($output, -1, 0);
                  fclose($output);
  
                  return $result;
              }
          } finally {
              if ($output) {
                  $this->setOutput($prevOutput);
              }
              if ($locale) {
                  setlocale(LC_NUMERIC, $locale);
              }
          }
      }
code_tokens: public function dump ( Data $ data , $ output = null ) { $ this -> decimalPoint = localeconv ( ) ; $ this -> decimalPoint = $ this -> decimalPoint [ 'decimal_point' ] ; if ( $ locale = $ this -> flags & ( self :: DUMP_COMMA_SEPARATOR | self :: DUMP_TRAILING_COMMA ) ? setlocale ( LC_NUMERIC , 0 ) : null ) { setlocale ( LC_NUMERIC , 'C' ) ; } if ( $ returnDump = true === $ output ) { $ output = fopen ( 'php://memory' , 'r+b' ) ; } if ( $ output ) { $ prevOutput = $ this -> setOutput ( $ output ) ; } try { $ data -> dump ( $ this ) ; $ this -> dumpLine ( - 1 ) ; if ( $ returnDump ) { $ result = stream_get_contents ( $ output , - 1 , 0 ) ; fclose ( $ output ) ; return $ result ; } } finally { if ( $ output ) { $ this -> setOutput ( $ prevOutput ) ; } if ( $ locale ) { setlocale ( LC_NUMERIC , $ locale ) ; } } }
docstring: Dumps a Data object.
  
  @param Data                               $data   A Data object
  @param callable|resource|string|true|null $output A line dumper callable, an opened stream, an output path or true to return the dump
  
  @return string|null The dump as string when $output is true
docstring_tokens: Dumps a Data object .