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; } } ?>
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 = 13
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 21
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 13
Branch analysis from position: 25
Branch analysis from position: 13
Branch analysis from position: 21
filename:       /in/Ic9Lr
function name:  (null)
number of ops:  26
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                                                      ->22
    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, ->21
    8    20    >   ECHO                                                     !3
    6    21    >   PRE_INC                                                  !3
         22    >   COUNT                                            ~15     !2
         23        IS_SMALLER                                               !3, ~15
         24      > JMPNZ                                                    ~16, ->13
   11    25    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.3 ms | 1395 KiB | 19 Q