in_array is too slow. Some proofs can be googled.

Here is one http://stackoverflow.com/questions/13483219/what-is-faster-in-array-or-isset