3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.48 ms | 1399 KiB | 17 Q