3v4l.org

run code in 300+ PHP versions simultaneously
<?php $haystack = 'this is a verygood school of sachin'; $pattern = 'sch'; for ($i = strlen($haystack); $i > 0; $i--) { echo $i . ' '; } for ($i = 0; $i < strlen($haystack); $i++) { echo $haystack[$i] . ' '; } $match = strstr($haystack, $pattern); $result = strlen($match) - strlen($pattern); echo $result; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 5
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 12
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 12
Branch analysis from position: 19
Branch analysis from position: 12
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 5
Branch analysis from position: 10
Branch analysis from position: 5
filename:       /in/W89FH
function name:  (null)
number of ops:  30
compiled vars:  !0 = $haystack, !1 = $pattern, !2 = $i, !3 = $match, !4 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'this+is+a+verygood+school+of+sachin'
    3     1        ASSIGN                                                   !1, 'sch'
    5     2        STRLEN                                           ~7      !0
          3        ASSIGN                                                   !2, ~7
          4      > JMP                                                      ->8
    6     5    >   CONCAT                                           ~9      !2, '+'
          6        ECHO                                                     ~9
    5     7        PRE_DEC                                                  !2
          8    >   IS_SMALLER                                               0, !2
          9      > JMPNZ                                                    ~11, ->5
    9    10    >   ASSIGN                                                   !2, 0
         11      > JMP                                                      ->16
   10    12    >   FETCH_DIM_R                                      ~13     !0, !2
         13        CONCAT                                           ~14     ~13, '+'
         14        ECHO                                                     ~14
    9    15        PRE_INC                                                  !2
         16    >   STRLEN                                           ~16     !0
         17        IS_SMALLER                                               !2, ~16
         18      > JMPNZ                                                    ~17, ->12
   13    19    >   INIT_FCALL                                               'strstr'
         20        SEND_VAR                                                 !0
         21        SEND_VAR                                                 !1
         22        DO_ICALL                                         $18     
         23        ASSIGN                                                   !3, $18
   14    24        STRLEN                                           ~20     !3
         25        STRLEN                                           ~21     !1
         26        SUB                                              ~22     ~20, ~21
         27        ASSIGN                                                   !4, ~22
   15    28        ECHO                                                     !4
   16    29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.3 ms | 1401 KiB | 15 Q