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; } } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 12
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 21
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 12
Branch analysis from position: 25
Branch analysis from position: 12
Branch analysis from position: 21
filename:       /in/iaLKt
function name:  (null)
number of ops:  26
compiled vars:  !0 = $pattern, !1 = $b, !2 = $i
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                                         $4      
          5        ASSIGN                                                   !1, $4
    4     6        INIT_FCALL                                               'array_reverse'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $6      
          9        ASSIGN                                                   !1, $6
    5    10        ASSIGN                                                   !2, 0
         11      > JMP                                                      ->22
    6    12    >   INIT_FCALL                                               'strpos'
         13        FETCH_DIM_R                                      ~9      !1, !2
         14        SEND_VAL                                                 ~9
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                         $10     
         17        TYPE_CHECK                                  1018          $10
         18      > JMPZ                                                     ~11, ->21
    7    19    >   ADD                                              ~12     !2, 1
         20        ECHO                                                     ~12
    5    21    >   PRE_INC                                                  !2
         22    >   COUNT                                            ~14     !1
         23        IS_SMALLER                                               !2, ~14
         24      > JMPNZ                                                    ~15, ->12
   10    25    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.26 ms | 1395 KiB | 19 Q