3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.3 ms | 1396 KiB | 19 Q