java - Smallest possible value to add to array?
From what I've read, you can store bytes in an array in PHP with this sort of command:
$array = [1,2,14,10];
I have four basic flags I want to add to each array value, something like 0000. If the user performed an action that unlocked the 3rd flag, the value should look like 0010. If all flags are set, the value would look like 1111.
I plan on having a lot of these types of array values, so I was wondering what the smallest possible value I could put into an array that's also Java friendly? After the data is stored in PHP, I'll need to get the array in Java and be able to retrieve these flags. That might look something like:
somevar array = array_from_php; if(array[flag3] == 1)//Player has unlocked this flag /*do something */
Any advice is greatly appreciated.