public static function GetMaxDepth( array $array ) : int
   {

      if ( \count( $array ) < 1 )
      {
         return 0;
      }

      $c = 1;
      foreach ( $array as $v )
      {

         if ( \is_array( $v ) )
         {
            $x = 1 + static::GetMaxDepth( $v );
            if ( $x > $c )
            {
               $c = $x;
            }
         }

      }

      return $c;

   }
public static function GetMaxDepth( array $array ) : int
   {

      if ( \count( $array ) < 1 )
      {
         return 0;
      }

      $c = 1;
      foreach ( $array as $v )
      {

         if ( \is_array( $v ) )
         {
            $x = 1 + static::GetMaxDepth( $v );
            if ( $x > $c )
            {
               $c = $x;
            }
         }

      }

      return $c;

   }
public static function GetMaxDepth ( array $ array ) : int { if ( \ count ( $ array ) < 1 ) { return 0 ; } $ c = 1 ; foreach ( $ array as $ v ) { if ( \ is_array ( $ v ) ) { $ x = 1 + static :: GetMaxDepth ( $ v ) ; if ( $ x > $ c ) { $ c = $ x ; } } } return $ c ; }
Returns the depth of permitted array.

@param  array $array The array to check
@return integer Returns the depth.
Returns the depth of permitted array .