dump() public method

Sends a formatted dump of a variable to a string.
public dump ( mixed $variable ) : string
$variable mixed Variable to display.
return string Output from print_r().
Exemplo n.º 1
0
 function dump($variable, $message = false)
 {
     $formatted = SimpleDumper::dump($variable);
     if ($message) {
         $formatted = $message . "\n" . $formatted;
     }
     $this->_runner->paintFormattedMessage($formatted);
     return $variable;
 }
Exemplo n.º 2
0
 public static function dump($data)
 {
     echo '<pre style="white-space: pre;padding:10px;font-family:Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif;margin-bottom:10px;background-color:#eee">';
     SimpleDumper::dump($data);
     echo '</pre>';
 }