This document contains PHP code for implementing a Tic Tac Toe game. It includes functions for generating the game board, tracking empty spaces, determining valid player moves, checking for wins or draws, and displaying the outcome. The code uses arrays to track the state of each space on the board as well as rows, columns and diagonals to detect winning patterns. It also includes logic for the computer to select optimal moves when it is their turn.