Utils/Console.php
/**
     * Dumps a variable in terms of a string.
     * This method achieves the similar functionality as var_dump and print_r
     * but is more robust when handling complex objects such as Yii controllers.
     *
     * @param mixed $var variable to be dumped
     * @param integer $depth maximum depth that the dumper should go into the variable. Defaults to 10.
     * @param boolean $highlight whether the result should be syntax-highlighted
     * @return string the string representation of the variable
     */
Dumps a variable in terms of a string.
This method achieves the similar functionality as var_dump and print_r
but is more robust when handling complex objects such as Yii controllers.

@param mixed $var variable to be dumped
@param integer $depth maximum depth that the dumper should go into the variable. Defaults to 10.
@param boolean $highlight whether the result should be syntax-highlighted
@return string the string representation of the variable
Dumps a variable in terms of a string . This method achieves the similar functionality as var_dump and print_r but is more robust when handling complex objects such as Yii controllers . @param mixed $var variable to be dumped @param integer $depth maximum depth that the dumper should go into the variable . Defaults to 10 . @param boolean $highlight whether the result should be syntax - highlighted @return string the string representation of the variable
public static function dumpAsString($var, $depth = 10, $highlight = false)
    {
        self::$_output  = '';
        self::$_objects = array();
        self::$_depth   = $depth;
        self::dumpInternal($var, 0);
        if ($highlight) {
            $result        = highlight_string(
                "<?php\n" . stripslashes(trim(self::normalizeSlashes(self::$_output), "' \n")),
                true
            );
            self::$_output = preg_replace('/&lt;\\?php<br \\/>/', '', $result, 1);
        }
        return stripslashes(trim(str_replace(array('(,'), array('('), self::normalizeSlashes(self::$_output)), "'"));
    }
public static function dumpAsString ( $ var , $ depth = 10 , $ highlight = false ) { self :: $ _output = '' ; self :: $ _objects = array ( ) ; self :: $ _depth = $ depth ; self :: dumpInternal ( $ var , 0 ) ; if ( $ highlight ) { $ result = highlight_string ( " <?php \n " . stripslashes ( trim ( self :: normalizeSlashes ( self :: $ _output ) , " '  \n " ) ) , true ) ; self :: $ _output = preg_replace ( '/&lt;\\?php<br \\/>/' , '' , $ result , 1 ) ; } return stripslashes ( trim ( str_replace ( array ( '(,' ) , array ( '(' ) , self :: normalizeSlashes ( self :: $ _output ) ) , " ' " ) ) ; }
Dumps a variable in terms of a string.
Dumps a variable in terms of a string .