experiments with markov chain in php