public static function export($var, $depth = 1, $indent = 0)
    {
        switch (static::getType($var)) {
            case 'boolean':
                return ($var) ? 'true' : 'false';
            case 'integer':
                return '(int) ' . $var;
            case 'float':
                return '(float) ' . $var;
            case 'string':
                if (trim($var) === '') {
                    return "''";
                }
                return "'" . $var . "'";
            case 'array':
                return static::exportArray($var, $depth - 1, $indent + 1);
            case 'resource':
                return strtolower(gettype($var));
            case 'null':
                return 'null';
            case 'unknown':
                return 'unknown';
            default:
                return static::exportObject($var, $depth - 1, $indent + 1);
        }
    }
public static function export($var, $depth = 1, $indent = 0)
    {
        switch (static::getType($var)) {
            case 'boolean':
                return ($var) ? 'true' : 'false';
            case 'integer':
                return '(int) ' . $var;
            case 'float':
                return '(float) ' . $var;
            case 'string':
                if (trim($var) === '') {
                    return "''";
                }
                return "'" . $var . "'";
            case 'array':
                return static::exportArray($var, $depth - 1, $indent + 1);
            case 'resource':
                return strtolower(gettype($var));
            case 'null':
                return 'null';
            case 'unknown':
                return 'unknown';
            default:
                return static::exportObject($var, $depth - 1, $indent + 1);
        }
    }
public static function export ( $ var , $ depth = 1 , $ indent = 0 ) { switch ( static :: getType ( $ var ) ) { case 'boolean' : return ( $ var ) ? 'true' : 'false' ; case 'integer' : return '(int) ' . $ var ; case 'float' : return '(float) ' . $ var ; case 'string' : if ( trim ( $ var ) === '' ) { return "''" ; } return "'" . $ var . "'" ; case 'array' : return static :: exportArray ( $ var , $ depth - 1 , $ indent + 1 ) ; case 'resource' : return strtolower ( gettype ( $ var ) ) ; case 'null' : return 'null' ; case 'unknown' : return 'unknown' ; default : return static :: exportObject ( $ var , $ depth - 1 , $ indent + 1 ) ; } }
Export function used to keep track of indentation and recursion.

@param mixed $var The variable to dump.
@param int $depth The remaining depth.
@param int $indent The current indentation level.
@return string The dumped variable.
@link https://github.com/cakephp/cakephp/blob/master/src/Error/Debugger.php
Export function used to keep track of indentation and recursion .