3v4l.org

run code in 300+ PHP versions simultaneously
<?php $♫ = "music"; var_dump( $♫ ); // string(5) "music" $start = 0; $string = "♫"; var_dump($len = mb_strlen("♫", '8bit')); echo mb_substr($string, $start, $len);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Us8Q3
function name:  (null)
number of ops:  21
compiled vars:  !0 = $♫, !1 = $start, !2 = $string, !3 = $len
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'music'
    3     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    4     4        ASSIGN                                                   !1, 0
    5     5        ASSIGN                                                   !2, '%E2%99%AB'
    6     6        INIT_FCALL                                               'var_dump'
          7        INIT_FCALL                                               'mb_strlen'
          8        SEND_VAL                                                 '%E2%99%AB'
          9        SEND_VAL                                                 '8bit'
         10        DO_ICALL                                         $8      
         11        ASSIGN                                           ~9      !3, $8
         12        SEND_VAL                                                 ~9
         13        DO_ICALL                                                 
    7    14        INIT_FCALL                                               'mb_substr'
         15        SEND_VAR                                                 !2
         16        SEND_VAR                                                 !1
         17        SEND_VAR                                                 !3
         18        DO_ICALL                                         $11     
         19        ECHO                                                     $11
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.45 ms | 1395 KiB | 19 Q