I don't agree with using md5() here: although the probability is very low there are some chances we get a collision. In addition php associative arrays already implement a very effective hash mechanism that do handle collision. I would rather use the whole string as "code_hash". This is also valid for other algorithms.