3v4l.org

run code in 300+ PHP versions simultaneously
<?php $♫ = "music"; var_dump( $♫ ); // string(5) "music" $len = 0; $string = "♫"; var_dump($len = mb_strlen("♫", '8bit')); echo mb_substr($string, 0, $len);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eRKbZ
function name:  (null)
number of ops:  21
compiled vars:  !0 = $♫, !1 = $len, !2 = $string
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                                         $7      
         11        ASSIGN                                           ~8      !1, $7
         12        SEND_VAL                                                 ~8
         13        DO_ICALL                                                 
    7    14        INIT_FCALL                                               'mb_substr'
         15        SEND_VAR                                                 !2
         16        SEND_VAL                                                 0
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                         $10     
         19        ECHO                                                     $10
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.06 ms | 1386 KiB | 19 Q