3v4l.org

run code in 300+ PHP versions simultaneously
<?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 } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/T6u30
function name:  (null)
number of ops:  2
compiled vars:  !0 = $board
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   27     1      > RETURN                                                   1

Function checkinput:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/T6u30
function name:  checkInput
number of ops:  11
compiled vars:  !0 = $first, !1 = $second, !2 = $third
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
   10     3        IS_EQUAL                                         ~3      !0, !1
          4      > JMPZ_EX                                          ~3      ~3, ->7
          5    >   IS_EQUAL                                         ~4      !0, !2
          6        BOOL                                             ~3      ~4
          7    > > JMPZ                                                     ~3, ->9
   11     8    > > RETURN                                                   <true>
   14     9    > > RETURN                                                   <false>
   15    10*     > RETURN                                                   null

End of function checkinput

Function checkboard:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 3
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 5
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 3
Branch analysis from position: 19
Branch analysis from position: 3
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 5
Branch analysis from position: 15
Branch analysis from position: 5
filename:       /in/T6u30
function name:  checkBoard
number of ops:  20
compiled vars:  !0 = $board, !1 = $i, !2 = $j
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
   18     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->16
   19     3    >   ASSIGN                                                   !2, 0
          4      > JMP                                                      ->11
   20     5    >   INIT_FCALL                                               'var_dump'
          6        FETCH_DIM_R                                      ~5      !0, !1
          7        FETCH_DIM_R                                      ~6      ~5, !2
          8        SEND_VAL                                                 ~6
          9        DO_ICALL                                                 
   19    10        PRE_INC                                                  !2
         11    >   FETCH_DIM_R                                      ~9      !0, !1
         12        COUNT                                            ~10     ~9
         13        IS_SMALLER                                               !2, ~10
         14      > JMPNZ                                                    ~11, ->5
   18    15    >   PRE_INC                                                  !1
         16    >   COUNT                                            ~13     !0
         17        IS_SMALLER                                               !1, ~13
         18      > JMPNZ                                                    ~14, ->3
   27    19    > > RETURN                                                   null

End of function checkboard

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.31 ms | 1400 KiB | 15 Q