public static function is_multidimensional($context, $shallow=true)
      {
        if (!(sizeof($context) > 0)) {
             return FALSE;
        }

        if ($shallow && (is_array($context[0]) || is_object($context[0]))) {
             return TRUE;
        }

        return false;
      }
public static function is_multidimensional($context, $shallow=true)
      {
        if (!(sizeof($context) > 0)) {
             return FALSE;
        }

        if ($shallow && (is_array($context[0]) || is_object($context[0]))) {
             return TRUE;
        }

        return false;
      }
public static function is_multidimensional ( $ context , $ shallow = true ) { if ( ! ( sizeof ( $ context ) > 0 ) ) { return FALSE ; } if ( $ shallow && ( is_array ( $ context [ 0 ] ) || is_object ( $ context [ 0 ] ) ) ) { return TRUE ; } return false ; }
check for multidimensional array, or objects.

perform a shallow inspection
traversing each object/array, would be too slow
@param context: array or object
check for multidimensional array or objects .