3v4l.org

run code in 300+ PHP versions simultaneously
<?php //header('Content-Type: text/html; charset=utf-8'); $str = "颜色代码"; var_dump(strpos($str, "代")); var_dump(mb_strpos($str, utf8_decode("颜色"), 0 ,"GBK"));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Mm0E1
function name:  (null)
number of ops:  21
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, '%E9%A2%9C%E8%89%B2%E4%BB%A3%E7%A0%81'
    7     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'strpos'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 '%E4%BB%A3'
          5        DO_ICALL                                         $2      
          6        SEND_VAR                                                 $2
          7        DO_ICALL                                                 
    9     8        INIT_FCALL                                               'var_dump'
          9        INIT_FCALL                                               'mb_strpos'
         10        SEND_VAR                                                 !0
         11        INIT_FCALL                                               'utf8_decode'
         12        SEND_VAL                                                 '%E9%A2%9C%E8%89%B2'
         13        DO_ICALL                                         $4      
         14        SEND_VAR                                                 $4
         15        SEND_VAL                                                 0
         16        SEND_VAL                                                 'GBK'
         17        DO_ICALL                                         $5      
         18        SEND_VAR                                                 $5
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.55 ms | 1395 KiB | 21 Q