3v4l.org

run code in 300+ PHP versions simultaneously
<?php //$utf8string = '测试杂志hello123等々'; $utf8string = '测试杂志'; $utf8string = mb_substr('测试杂志', 0, 10, 'UTF-8'); echo $utf8string; //$var = 'hello123'; //$pos = strpos($utf8string, $var); //if ($pos!==false) { //echo substr($utf8string, 0, 10); //}
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AmbgY
function name:  (null)
number of ops:  10
compiled vars:  !0 = $utf8string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, '%E6%B5%8B%E8%AF%95%E6%9D%82%E5%BF%97'
    6     1        INIT_FCALL                                               'mb_substr'
          2        SEND_VAL                                                 '%E6%B5%8B%E8%AF%95%E6%9D%82%E5%BF%97'
          3        SEND_VAL                                                 0
          4        SEND_VAL                                                 10
          5        SEND_VAL                                                 'UTF-8'
          6        DO_ICALL                                         $2      
          7        ASSIGN                                                   !0, $2
    7     8        ECHO                                                     !0
   12     9      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.18 ms | 1394 KiB | 15 Q