public static function ar($a, $b = null, $deep = false)
    {
        $r = array();
        if (is_array($a) || is_object($a)) {
            foreach ($a as $k => $v) {
                if ($deep == true && (is_array($v) || is_object($v))) {
                    $v = self::ar($v, null, true);
                }
                $r[$k] = $v;
            }
        } elseif (is_string($a) || is_int($a)) {
            if ($b !== null) {
                $r[$a] = $b;
            } else {
                $r[] = $a;
            }
        }
        return $r;
    }
public static function ar($a, $b = null, $deep = false)
    {
        $r = array();
        if (is_array($a) || is_object($a)) {
            foreach ($a as $k => $v) {
                if ($deep == true && (is_array($v) || is_object($v))) {
                    $v = self::ar($v, null, true);
                }
                $r[$k] = $v;
            }
        } elseif (is_string($a) || is_int($a)) {
            if ($b !== null) {
                $r[$a] = $b;
            } else {
                $r[] = $a;
            }
        }
        return $r;
    }
public static function ar ( $ a , $ b = null , $ deep = false ) { $ r = array ( ) ; if ( is_array ( $ a ) || is_object ( $ a ) ) { foreach ( $ a as $ k => $ v ) { if ( $ deep == true && ( is_array ( $ v ) || is_object ( $ v ) ) ) { $ v = self :: ar ( $ v , null , true ) ; } $ r [ $ k ] = $ v ; } } elseif ( is_string ( $ a ) || is_int ( $ a ) ) { if ( $ b !== null ) { $ r [ $ a ] = $ b ; } else { $ r [ ] = $ a ; } } return $ r ; }
Converts arrays, objects, integers or strings into arrays.

@access public
@param  mixed  $a    the variable to be converted or the key if $b is set.
@param  mixed  $b    the value for key $a.
@param  mixed  $deep flag if the converting should be limited on first layer or
also be appended to deeper objects.
@return array        a fresh an clean array.
Converts arrays objects integers or strings into arrays .