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 . ' '; } echo '<br>'; 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 = 17
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 13
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 13
Branch analysis from position: 20
Branch analysis from position: 13
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/FfVHi
function name:  (null)
number of ops:  31
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    >   ECHO                                                     '%3Cbr%3E'
   11    11        ASSIGN                                                   !2, 0
         12      > JMP                                                      ->17
   12    13    >   FETCH_DIM_R                                      ~13     !0, !2
         14        CONCAT                                           ~14     ~13, '+'
         15        ECHO                                                     ~14
   11    16        PRE_INC                                                  !2
         17    >   STRLEN                                           ~16     !0
         18        IS_SMALLER                                               !2, ~16
         19      > JMPNZ                                                    ~17, ->13
   15    20    >   INIT_FCALL                                               'strstr'
         21        SEND_VAR                                                 !0
         22        SEND_VAR                                                 !1
         23        DO_ICALL                                         $18     
         24        ASSIGN                                                   !3, $18
   16    25        STRLEN                                           ~20     !3
         26        STRLEN                                           ~21     !1
         27        SUB                                              ~22     ~20, ~21
         28        ASSIGN                                                   !4, ~22
   17    29        ECHO                                                     !4
   18    30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.98 ms | 1396 KiB | 15 Q