Max XOR After Operations

You may unset any bit in any element of an array any number of times. After performing operations, compute the XOR of all elements. What is the maximum possible XOR value achievable? Each bit can remain set if at least one element originally had that bit set.

Examples
Input: [3,2,4,6]
Output: 7
Hints

Max XOR After Operations

You may unset any bit in any element of an array any number of times. After performing operations, compute the XOR of all elements. What is the maximum possible XOR value achievable? Each bit can remain set if at least one element originally had that bit set.