PHP - Binary Bayesian Filter