3v4l.org

run code in 300+ PHP versions simultaneously
<?php class SudokuSolver { protected $sudoku; public function __construct(array $sudoku) { $this->sudoku = $sudoku; } public function print() { foreach ($sudoku as $column) { foreach ($column as $cell) { echo "|"; if (null !== $cell) { echo $cell; } else { echo " "; } } echo "|\n"; } } protected function checkConsistenz() { } protected function checkRow($rowIndex) { } } $sudoku = array(); $sudoku[] = array(null,3,null, null,null,null, null,null,null); $sudoku[] = array(null,null,null, 1,9,5, null,null,null); $sudoku[] = array(null,null,8, null,null,null, null,6,null); $sudoku[] = array(8,null,null, null,6,null, null,null,null); $sudoku[] = array(4,null,null, 8,null,null, null,null,1); $sudoku[] = array(null,null,null ,null,2,null, null,null,null); $sudoku[] = array(null,6,null, null,null,null, 2,8,null); $sudoku[] = array(null,null,null, 4,1,9, null,null,5); $sudoku[] = array(null,null,null, null,null,null, null,7,null); $sudokuSolver = new SudokuSolver($sudoko); $sudokuSolver->print();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MD10b
function name:  (null)
number of ops:  26
compiled vars:  !0 = $sudoku, !1 = $sudokuSolver, !2 = $sudoko
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   37     0  E >   ASSIGN                                                   !0, <array>
   38     1        ASSIGN_DIM                                               !0
          2        OP_DATA                                                  <array>
   39     3        ASSIGN_DIM                                               !0
          4        OP_DATA                                                  <array>
   40     5        ASSIGN_DIM                                               !0
          6        OP_DATA                                                  <array>
   41     7        ASSIGN_DIM                                               !0
          8        OP_DATA                                                  <array>
   42     9        ASSIGN_DIM                                               !0
         10        OP_DATA                                                  <array>
   43    11        ASSIGN_DIM                                               !0
         12        OP_DATA                                                  <array>
   44    13        ASSIGN_DIM                                               !0
         14        OP_DATA                                                  <array>
   45    15        ASSIGN_DIM                                               !0
         16        OP_DATA                                                  <array>
   46    17        ASSIGN_DIM                                               !0
         18        OP_DATA                                                  <array>
   48    19        NEW                                              $13     'SudokuSolver'
         20        SEND_VAR_EX                                              !2
         21        DO_FCALL                                      0          
         22        ASSIGN                                                   !1, $13
   49    23        INIT_METHOD_CALL                                         !1, 'print'
         24        DO_FCALL                                      0          
         25      > RETURN                                                   1

Class SudokuSolver:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MD10b
function name:  __construct
number of ops:  4
compiled vars:  !0 = $sudoku
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        ASSIGN_OBJ                                               'sudoku'
          2        OP_DATA                                                  !0
    8     3      > RETURN                                                   null

End of function __construct

Function print:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 1, Position 2 = 14
Branch analysis from position: 1
2 jumps found. (Code = 78) Position 1 = 2, Position 2 = 14
Branch analysis from position: 2
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 11
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 11
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 1
Branch analysis from position: 1
Branch analysis from position: 11
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/MD10b
function name:  print
number of ops:  16
compiled vars:  !0 = $sudoku, !1 = $column, !2 = $cell
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E > > FE_RESET_R                                       $3      !0, ->14
          1    > > FE_FETCH_R                                               $3, !1, ->14
   14     2    > > FE_RESET_R                                       $4      !1, ->11
          3    > > FE_FETCH_R                                               $4, !2, ->11
   15     4    >   ECHO                                                     '%7C'
   16     5        TYPE_CHECK                                  1020          !2
          6      > JMPZ                                                     ~5, ->9
   17     7    >   ECHO                                                     !2
          8      > JMP                                                      ->10
   19     9    >   ECHO                                                     '+'
   14    10    > > JMP                                                      ->3
         11    >   FE_FREE                                                  $4
   22    12        ECHO                                                     '%7C%0A'
   13    13      > JMP                                                      ->1
         14    >   FE_FREE                                                  $3
   24    15      > RETURN                                                   null

End of function print

Function checkconsistenz:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MD10b
function name:  checkConsistenz
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E > > RETURN                                                   null

End of function checkconsistenz

Function checkrow:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MD10b
function name:  checkRow
number of ops:  2
compiled vars:  !0 = $rowIndex
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   30     0  E >   RECV                                             !0      
   33     1      > RETURN                                                   null

End of function checkrow

End of class SudokuSolver.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.13 ms | 1399 KiB | 13 Q