3v4l.org

run code in 300+ PHP versions simultaneously
<?php $mystring = mb_convert_encoding("¨l", 'windows-1252', 'UTF-8'); var_dump($mystring); var_dump(substr($mystring, 0, 1)); var_dump(mb_substr($mystring, 0, 1, "UTF-8"));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZOvX2
function name:  (null)
number of ops:  27
compiled vars:  !0 = $mystring
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'mb_convert_encoding'
          1        SEND_VAL                                                 '%C2%A8l'
          2        SEND_VAL                                                 'windows-1252'
          3        SEND_VAL                                                 'UTF-8'
          4        DO_ICALL                                         $1      
          5        ASSIGN                                                   !0, $1
    5     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
    6     9        INIT_FCALL                                               'var_dump'
         10        INIT_FCALL                                               'substr'
         11        SEND_VAR                                                 !0
         12        SEND_VAL                                                 0
         13        SEND_VAL                                                 1
         14        DO_ICALL                                         $4      
         15        SEND_VAR                                                 $4
         16        DO_ICALL                                                 
    7    17        INIT_FCALL                                               'var_dump'
         18        INIT_FCALL                                               'mb_substr'
         19        SEND_VAR                                                 !0
         20        SEND_VAL                                                 0
         21        SEND_VAL                                                 1
         22        SEND_VAL                                                 'UTF-8'
         23        DO_ICALL                                         $6      
         24        SEND_VAR                                                 $6
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.35 ms | 1013 KiB | 17 Q