3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = "this is school of sachin"; $pattern = "sch"; $b = explode(' ',$a); $b = array_reverse($b); for($i=0;$i < count($b);$i++){ if(strpos($b[$i],$pattern) !== false){ echo $i+1; if($pattern == $b[$i]){ echo ',full word'; } else{ echo ',not a full word'; } } } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 13
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 28
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 27
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 13
Branch analysis from position: 32
Branch analysis from position: 13
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 13
Branch analysis from position: 32
Branch analysis from position: 13
Branch analysis from position: 28
filename:       /in/lFd9n
function name:  (null)
number of ops:  33
compiled vars:  !0 = $a, !1 = $pattern, !2 = $b, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'this+is+school+of+sachin'
    3     1        ASSIGN                                                   !1, 'sch'
    4     2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '+'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $6      
          6        ASSIGN                                                   !2, $6
    5     7        INIT_FCALL                                               'array_reverse'
          8        SEND_VAR                                                 !2
          9        DO_ICALL                                         $8      
         10        ASSIGN                                                   !2, $8
    6    11        ASSIGN                                                   !3, 0
         12      > JMP                                                      ->29
    7    13    >   INIT_FCALL                                               'strpos'
         14        FETCH_DIM_R                                      ~11     !2, !3
         15        SEND_VAL                                                 ~11
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                         $12     
         18        TYPE_CHECK                                  1018          $12
         19      > JMPZ                                                     ~13, ->28
    8    20    >   ADD                                              ~14     !3, 1
         21        ECHO                                                     ~14
    9    22        FETCH_DIM_R                                      ~15     !2, !3
         23        IS_EQUAL                                                 !1, ~15
         24      > JMPZ                                                     ~16, ->27
   10    25    >   ECHO                                                     '%2Cfull+word'
         26      > JMP                                                      ->28
   13    27    >   ECHO                                                     '%2Cnot+a+full+word'
    6    28    >   PRE_INC                                                  !3
         29    >   COUNT                                            ~18     !2
         30        IS_SMALLER                                               !3, ~18
         31      > JMPNZ                                                    ~19, ->13
   17    32    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.21 ms | 1396 KiB | 19 Q