Let\'s say I have the following structure:
abstract class Hand {} class Rock extends Hand {} class Paper extends Hand {} class Scissors extends Hand {}
From PHP chat
OOP-style
Simple function
ROCK, ROCK => SCISSORS, SCISSORS => PAPER]; return intval($winners[$hand1] !== $hand2) + 1; }