3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "\xb7\x51 &\xb4\xa6\xb6\x7d"; $pos1 = mb_strpos($str,'&',0,'utf-8'); var_dump($pos1); $pos2 = mb_strpos($str,'&',$pos1 + 1,'utf-8'); var_dump($pos2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5650p
function name:  (null)
number of ops:  23
compiled vars:  !0 = $str, !1 = $pos1, !2 = $pos2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%B7Q+%26%B4%A6%B6%7D'
    4     1        INIT_FCALL                                               'mb_strpos'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '%26'
          4        SEND_VAL                                                 0
          5        SEND_VAL                                                 'utf-8'
          6        DO_ICALL                                         $4      
          7        ASSIGN                                                   !1, $4
    5     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                                 
    6    11        INIT_FCALL                                               'mb_strpos'
         12        SEND_VAR                                                 !0
         13        SEND_VAL                                                 '%26'
         14        ADD                                              ~7      !1, 1
         15        SEND_VAL                                                 ~7
         16        SEND_VAL                                                 'utf-8'
         17        DO_ICALL                                         $8      
         18        ASSIGN                                                   !2, $8
    7    19        INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !2
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
11.65 ms | 411 KiB | 7 Q