3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = "test1"; $b = strpos($a, "b"); if($b!=FALSE) { $c = substr($a, $b, $b+2); echo $c; } else { echo "not found"; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 17
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZKGum
function name:  (null)
number of ops:  19
compiled vars:  !0 = $a, !1 = $b, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'test1'
    3     1        INIT_FCALL                                               'strpos'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 'b'
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
    4     6        BOOL                                             ~6      !1
          7      > JMPZ                                                     ~6, ->17
    6     8    >   INIT_FCALL                                               'substr'
          9        SEND_VAR                                                 !0
         10        SEND_VAR                                                 !1
         11        ADD                                              ~7      !1, 2
         12        SEND_VAL                                                 ~7
         13        DO_ICALL                                         $8      
         14        ASSIGN                                                   !2, $8
    7    15        ECHO                                                     !2
         16      > JMP                                                      ->18
   11    17    >   ECHO                                                     'not+found'
   14    18    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.9 ms | 1386 KiB | 17 Q