Rubik's Cube scramble generator in PHP