Your game looks generally fine, they're being weird.
Is it possible that you misunderstood and they (a) wanted you to use a different language than PHP (perhaps because they're a Rails shop or something), or (b) wanted you to do this in pure JS, with e.g. localStorage?
Also, the block indentation/braces look deeply messed up on github, any idea what happened?
https://github.com/m4nuC/memGame/blob/master/app/controllers...