3v4l.org

run code in 300+ PHP versions simultaneously
<?php $alfabeto = array ('a', 'b'); $estados = array ('q0', 'q1', 'q2', 'q3'); $estInicial = 'q0'; $estadosFinales = array ('q3'); $fTransicion = array(); $fTransicion['q0']['a'] = array ('q0', 'q1'); $fTransicion['q0']['b'] = array ('q0'); $fTransicion['q1']['a'] = array (); $fTransicion['q1']['b'] = array ('q2'); $fTransicion['q2']['a'] = array ('q3'); $fTransicion['q2']['b'] = array (); $fTransicion['q3']['a'] = array ('q3'); $fTransicion['q3']['b'] = array ('q3'); $palabra='aba'; function Evaluar($_palabra,$_fTransicion,$_alfabeto,$_estados){ for ($i=0; $i < count($_estados) ; $i++) { for ($j=0; $j <count($_alfabeto) ; $j++) { echo $_fTransicion[i][j]; } echo ('/n'); } } Evaluar($palabra,$fTransicion,$alfabeto,$estados); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pGIoq
function name:  (null)
number of ops:  37
compiled vars:  !0 = $alfabeto, !1 = $estados, !2 = $estInicial, !3 = $estadosFinales, !4 = $fTransicion, !5 = $palabra
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, <array>
    6     2        ASSIGN                                                   !2, 'q0'
    7     3        ASSIGN                                                   !3, <array>
    8     4        ASSIGN                                                   !4, <array>
   11     5        FETCH_DIM_W                                      $11     !4, 'q0'
          6        ASSIGN_DIM                                               $11, 'a'
          7        OP_DATA                                                  <array>
   12     8        FETCH_DIM_W                                      $13     !4, 'q0'
          9        ASSIGN_DIM                                               $13, 'b'
         10        OP_DATA                                                  <array>
   14    11        FETCH_DIM_W                                      $15     !4, 'q1'
         12        ASSIGN_DIM                                               $15, 'a'
         13        OP_DATA                                                  <array>
   15    14        FETCH_DIM_W                                      $17     !4, 'q1'
         15        ASSIGN_DIM                                               $17, 'b'
         16        OP_DATA                                                  <array>
   18    17        FETCH_DIM_W                                      $19     !4, 'q2'
         18        ASSIGN_DIM                                               $19, 'a'
         19        OP_DATA                                                  <array>
   19    20        FETCH_DIM_W                                      $21     !4, 'q2'
         21        ASSIGN_DIM                                               $21, 'b'
         22        OP_DATA                                                  <array>
   22    23        FETCH_DIM_W                                      $23     !4, 'q3'
         24        ASSIGN_DIM                                               $23, 'a'
         25        OP_DATA                                                  <array>
   23    26        FETCH_DIM_W                                      $25     !4, 'q3'
         27        ASSIGN_DIM                                               $25, 'b'
         28        OP_DATA                                                  <array>
   25    29        ASSIGN                                                   !5, 'aba'
   36    30        INIT_FCALL                                               'evaluar'
         31        SEND_VAR                                                 !5
         32        SEND_VAR                                                 !4
         33        SEND_VAR                                                 !0
         34        SEND_VAR                                                 !1
         35        DO_FCALL                                      0          
   37    36      > RETURN                                                   1

Function evaluar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 6
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 8
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 6
Branch analysis from position: 22
Branch analysis from position: 6
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 8
Branch analysis from position: 17
Branch analysis from position: 8
filename:       /in/pGIoq
function name:  Evaluar
number of ops:  23
compiled vars:  !0 = $_palabra, !1 = $_fTransicion, !2 = $_alfabeto, !3 = $_estados, !4 = $i, !5 = $j
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
   28     4        ASSIGN                                                   !4, 0
          5      > JMP                                                      ->19
   29     6    >   ASSIGN                                                   !5, 0
          7      > JMP                                                      ->14
   30     8    >   FETCH_CONSTANT                                   ~8      'i'
          9        FETCH_CONSTANT                                   ~10     'j'
         10        FETCH_DIM_R                                      ~9      !1, ~8
         11        FETCH_DIM_R                                      ~11     ~9, ~10
         12        ECHO                                                     ~11
   29    13        PRE_INC                                                  !5
         14    >   COUNT                                            ~13     !2
         15        IS_SMALLER                                               !5, ~13
         16      > JMPNZ                                                    ~14, ->8
   33    17    >   ECHO                                                     '%2Fn'
   28    18        PRE_INC                                                  !4
         19    >   COUNT                                            ~16     !3
         20        IS_SMALLER                                               !4, ~16
         21      > JMPNZ                                                    ~17, ->6
   35    22    > > RETURN                                                   null

End of function evaluar

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.36 ms | 1403 KiB | 14 Q