Could use bit field, not sure what exactly youre doing but its just an idea. You are limited to using a min of 0 and max of 31 but you can extend it with a little more code. Let me know if you have any questions.
PHP Code:
const NUMBERS = 1 << 10 | 1 << 15 |1 << 30;
var = 1 << 5 | 1 << 15;
//true if at least one exists
if ( var & NUMBERS )
//true since 1<<15 exists
var = 1 << 15;
// true if only 1 << 15 exists, you can | additional flags
if ( ( var & NUMBERS) == 1 << 15 )
//true since only 1<<15 exists
var = 1 << 10 | 1 << 15 | 1 << 20;
//true if all exist
if ( ( var & NUMBERS ) == NUMBERS )
//true since all exist
__________________