public static function reverseIfLittleEndian($toCheck)
    {
        // Little endian, needs to be reversed
        if (unpack('S',"\x01\x00")[1] === 1)
        {
            // Reverse an array
            if (is_array($toCheck))
            {
                return array_reverse($toCheck);
            }

            // Reverse a string
            else
            {
                return strrev($toCheck);
            }
        }

        // Big endian, no need to reverse
        else
        {
            return $toCheck;
        }
    }