3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.46 ms | 1388 KiB | 19 Q