Cracking the Cryptext with PHP

In the book the DaVinci code there’s a fun little device called a “Cryptex”. It a container for a secret message, and to open it, you need to align some dials to the correct position. In an quiz somewhere you were invited to crack such a cryptext consisting of 6 dials with 6 letters on each to find the correct combination, which would spell a word. To find the solution quickly, all you need is PHP.