Check if 2 arrays are equals

@link http://stackoverflow.com/a/14853974/805649
@param  array array the array to compare to
@return bool true of the 2 arrays are equals
164596
function arrayEquals(arrayA, arrayB) {
	"use strict";

	// if the other array is a falsy value, return
	if (!arrayB || !arrayA) {
		return false;
	}

	// compare lengths - can save a lot of time
	if (arrayA.length !== arrayB.length) {
		return false;
	}

	for (var i = 0; i < arrayA.length; i++) {
		// Check if we have nested arrays
		if (arrayA[i] instanceof Array && arrayB[i] instanceof Array) {
			// recurse into the nested arrays
			if (!arrayEquals(arrayA[i], arrayB[i])) {
				return false;
			}
		}
		else if (arrayA[i] !== arrayB[i]) {
			// Warning - two different object instances will never be equal: {x:20} != {x:20}
			return false;
		}
	}
	return true;
}
1203017
private static function checkDataType($array)
    {
        if(count($array) <= 1)
        {
            return true;
        }

        $last = count($array) - 1;

        $type = self::getCustomDataType($array[$last]);

        if ($type != self::getCustomDataType($array[0]))
        {
            return false;
        }
        else
        {
            return true;
        }
    }
1072913
protected function isNumericallyIndexedArray(array $phpArray): bool
    {
        foreach (array_keys($phpArray) as $key) {
            if (is_numeric($key) === false) {
                return false;
            }
        }
        return true;
    }
985783
public static function isSubArray(array $array, array $subArray, $strictComparison = true)
    {
        if (!is_bool($strictComparison)) {
            throw new InvalidArgumentException('Strict comparison parameter must be a boolean');
        }

        $return = true;
        foreach ($subArray as $key => $value) {
            if (isset($array[$key]) || array_key_exists($key, $array)) {
                $check = $strictComparison ? $array[$key] !== $subArray[$key] : $array[$key] != $subArray[$key];
                if ($check) {
                    $return = false;
                    break;
                }
            } else {
                $return = false;
                break;
            }
        }

        return $return;
    }
741024
private function matchVersion(array $array)
    {
        if (!isset($array["version"])) {
            return true;
        }

        if (is_array($array["version"])) {
            foreach ($array["version"] as $version)
            {
                if ($version == $this->getVersion() || $version == "*") {
                    return true;
                }
            }
        } elseif (is_string($array["version"])) {
            if ($array["version"] == $this->getVersion() || $array["version"] == "*") {
                return true;
            }
        }

        return false;
    }
608659
public static function isList($array)
    {
        if( !is_array( $array ) )
            return false;

        // using Stripe's library as a base for this was a cluster fuck of an idea.
        // why? figure this out:
        $keys = array_keys( $array );
        foreach( array_keys( $array ) as $i )
            if( !is_numeric( $i ) )
                return false;

        return true;
    }
1360310
private function is_multidimensional($array) {

		if(false === is_array($array)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type Array, "%s" given', __METHOD__, gettype($array)), E_USER_ERROR);
		}

	    return (count(array_filter($array, 'is_array')) > 0);
	}
515020
public static function hasKey(Array $array, Array $keys)
    {
        foreach ($array as $key => $value) {
            if (in_array($key, $keys)) {
                return true;
            }
        }

        return false;
    }
254063
public function matchesPackage(array $array) {
		if (isset($array['package']) && $array['package'] == $this->package->getName()
				&& isset($array['class']) && $array['class'] == $this->getClassName()) {
			return true;
		} else {
			return false;
		}
	}
572316
public static function IsSingleDepth( array $array ) : bool
   {

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

      foreach ( $array as $v )
      {
         if ( \is_array( $v ) && \count( $v ) > 0 )
         {
            return false;
         }
      }

      return true;

   }
564323
protected function isArrayHasKeys($array = [], $keys = []) {
		foreach ($keys as $key) {
			if (!ArrayHelper::getValue($array, $key, false)) {
				return false;
			}
		}

		return true;
	}
762582
protected function shuffleAssoc(&$array) 
    {
        $keys = array_keys($array);
        shuffle($keys);
        shuffle($keys);
    
        foreach($keys as $key) 
        {
            $new[$key] = $array[$key];
            unset($array[$key]); /* save memory */
        }
        $array = $new;
        
        return true;
    }
710515
public function matchesPackage(array $array) {
		if (isset($array['package']) && $array['package'] == $this->package->getName()
				&& isset($array['url']) && $array['url'] == $this->getUrl()) {
			return true;
		} else {
			return false;
		}
	}
880185
private function arraysDiffer(array $array1, array $array2)
    {
        foreach ($array2 as $property => $value) {
            if (!array_key_exists($property, $array1)) {
                return true;
            }
            if (is_array($value)) {
                if (!is_array($array1[$property])) {
                    return true;
                }
                if ($array1[$property] != $value && $this->arraysDiffer($array1[$property], $value)) {
                    return true;
                }
                continue;
            }
            if ($array1[$property] != $value) {
                return true;
            }
        }

        return false;
    }
727210
public function isSequentialArray($array)
    {
        $counter = 0;
        foreach ($array as $key => $value) {
            if ($counter !== $key) {
                return false;
            }
            $counter++;
        }

        return true;
    }
1260896
public static function is_associative (array $array)
		{
			foreach ($array as $k => $v)
			{
				$t = str_replace((int)$k, '', $k);
				if (!empty($t))
				{
					if (!static::is_int($k))
					{
						return true;
					}
				}
			}

			return false;
		}
1104252
public static function has($array, $keys)
	{
		if(is_null($keys) || !$array)
			return false;

		$keys = static::toArray($keys);

		if($keys === [])
			return false;

		foreach ($keys as $key) {
			$subKeyArray = $array;

			if (static::exists($array, $key))
				continue;

			foreach (static::toKey($key) as $segment) {
				if (static::accessible($subKeyArray) && static::exists($subKeyArray, $segment))
					$subKeyArray = $subKeyArray[$segment];
				else
					return false;
			}
		}

		return true;
	}