3v4l.org

run code in 300+ PHP versions simultaneously
<?php header('Content-Type: text/html; charset=utf-8'); $str = "颜色代码"; var_dump(strpos($str, "代")); var_dumo(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/9qJX7
function name:  (null)
number of ops:  24
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'header'
          1        SEND_VAL                                                 'Content-Type%3A+text%2Fhtml%3B+charset%3Dutf-8'
          2        DO_ICALL                                                 
    5     3        ASSIGN                                                   !0, '%E9%A2%9C%E8%89%B2%E4%BB%A3%E7%A0%81'
    7     4        INIT_FCALL                                               'var_dump'
          5        INIT_FCALL                                               'strpos'
          6        SEND_VAR                                                 !0
          7        SEND_VAL                                                 '%E4%BB%A3'
          8        DO_ICALL                                         $3      
          9        SEND_VAR                                                 $3
         10        DO_ICALL                                                 
    9    11        INIT_FCALL_BY_NAME                                       'var_dumo'
         12        INIT_FCALL                                               'mb_strpos'
         13        SEND_VAR                                                 !0
         14        INIT_FCALL                                               'utf8_decode'
         15        SEND_VAL                                                 '%E9%A2%9C%E8%89%B2'
         16        DO_ICALL                                         $5      
         17        SEND_VAR                                                 $5
         18        SEND_VAL                                                 0
         19        SEND_VAL                                                 'GBK'
         20        DO_ICALL                                         $6      
         21        SEND_VAR_NO_REF_EX                                       $6
         22        DO_FCALL                                      0          
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.62 ms | 1395 KiB | 23 Q