3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $board = array( array('x', 'o', 'x'), array('o', 'x', 'o'), array('x', 'o', 'x') ); function checkInput($first, $second, $third) { if($first == $second && $first == $third) { return true; } return false; } function checkBoard($board) { for($i=0; $i<sizeof($board); $i++){ for($j=0; $j<sizeof($board[$i]); $j++){ var_dump($board[$i][$j]); } // //check rows // if(checkInput($board[])) // //check columns // //check diagonal } }
based on BCcdj
Output for 5.6.0 - 7.3.0beta1