public static function append()
    {
        if (error_reporting() !== E_ALL) {
            return;
        }

        $value = func_get_args();

        if (count($value) < 2) {
            $value = reset($value);
        }

        $debugobj = new stdClass();
        $debugobj->time = Timer::benchScript(5);
        $debugobj->mu = memory_get_usage();
        $debugobj->type = gettype($value);

        if (is_array($value) || is_object($value)) {
            $debugobj->data = @print_r($value, true);
        } else {
            $debugobj->data = $value;
        }

        $backtrace = debug_backtrace();

        $calledFrom = '';
        if (isset($backtrace[3]['function'])) {
            $calledFrom = $backtrace[3]['function'];
        }

        $debugobj->backtrace = "{$backtrace[2]['file']} line {$backtrace[2]['line']} (Called from {$calledFrom}())";

        if (self::$shutdown === false) {
            register_shutdown_function(array("Libvaloa\Debug\Debug", 'dump'));
            self::$shutdown = true;
        }

        self::$data[] = $debugobj;
    }
public static function append()
    {
        if (error_reporting() !== E_ALL) {
            return;
        }

        $value = func_get_args();

        if (count($value) < 2) {
            $value = reset($value);
        }

        $debugobj = new stdClass();
        $debugobj->time = Timer::benchScript(5);
        $debugobj->mu = memory_get_usage();
        $debugobj->type = gettype($value);

        if (is_array($value) || is_object($value)) {
            $debugobj->data = @print_r($value, true);
        } else {
            $debugobj->data = $value;
        }

        $backtrace = debug_backtrace();

        $calledFrom = '';
        if (isset($backtrace[3]['function'])) {
            $calledFrom = $backtrace[3]['function'];
        }

        $debugobj->backtrace = "{$backtrace[2]['file']} line {$backtrace[2]['line']} (Called from {$calledFrom}())";

        if (self::$shutdown === false) {
            register_shutdown_function(array("Libvaloa\Debug\Debug", 'dump'));
            self::$shutdown = true;
        }

        self::$data[] = $debugobj;
    }
public static function append ( ) { if ( error_reporting ( ) !== E_ALL ) { return ; } $ value = func_get_args ( ) ; if ( count ( $ value ) < 2 ) { $ value = reset ( $ value ) ; } $ debugobj = new stdClass ( ) ; $ debugobj -> time = Timer :: benchScript ( 5 ) ; $ debugobj -> mu = memory_get_usage ( ) ; $ debugobj -> type = gettype ( $ value ) ; if ( is_array ( $ value ) || is_object ( $ value ) ) { $ debugobj -> data = @ print_r ( $ value , true ) ; } else { $ debugobj -> data = $ value ; } $ backtrace = debug_backtrace ( ) ; $ calledFrom = '' ; if ( isset ( $ backtrace [ 3 ] [ 'function' ] ) ) { $ calledFrom = $ backtrace [ 3 ] [ 'function' ] ; } $ debugobj -> backtrace = "{$backtrace[2]['file']} line {$backtrace[2]['line']} (Called from {$calledFrom}())" ; if ( self :: $ shutdown === false ) { register_shutdown_function ( array ( "Libvaloa\Debug\Debug" , 'dump' ) ) ; self :: $ shutdown = true ; } self :: $ data [ ] = $ debugobj ; }
Append debug messages to debug object.
Append debug messages to debug object .