Hello,
I would like to implement a 2 player game in php in an object oriented manner. The game logic should be controlled by an object that would be instantiated by player A, yet it should also be possible for player B to access and manipulate this object. I'm not too familiar with php but after a long day of googling for answers I've learned that objects in php seem to only persist in a SESSION context (that is on a per user basis). Workarounds seem to include object serialisation/deserialisation either in a database or to/from a file. Another proposed solution could be something called "shared memory" access, yet I don't like to fiddle with such low level issues.
So I'd like to ask you: is this really all there is? And if this IS really all there is, and if I would have to go for the serialisation/deserialisation solution, isn't there a library or framework that would abstract out the implementation details of it, since I don't like re-inventing the wheel and writing up such a solution myself is likely to be auite errorprone and subject to various security issues. Yes, you can call me lazy 🙂
Many thanks.