3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a='ddd王多多'; echo mb_substr($a,0,2,'utf-8'); exit;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/DLWgv
function name:  (null)
number of ops:  10
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'ddd%E7%8E%8B%E5%A4%9A%E5%A4%9A'
    5     1        INIT_FCALL                                               'mb_substr'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 0
          4        SEND_VAL                                                 2
          5        SEND_VAL                                                 'utf-8'
          6        DO_ICALL                                         $2      
          7        ECHO                                                     $2
    7     8      > EXIT                                                     
          9*     > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.82 ms | 1393 KiB | 15 Q