3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "♫"; $len = mb_strlen($string, '8bit'); for($i=0;$i<$len;++$i) echo ord(mb_substr($string, $i, 1, 'UTF-8'))."<br/>";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 8
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 8
Branch analysis from position: 22
Branch analysis from position: 8
filename:       /in/uESKT
function name:  (null)
number of ops:  23
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                                                      ->20
    6     8    >   INIT_FCALL                                               'ord'
          9        INIT_FCALL                                               'mb_substr'
         10        SEND_VAR                                                 !0
         11        SEND_VAR                                                 !2
         12        SEND_VAL                                                 1
         13        SEND_VAL                                                 'UTF-8'
         14        DO_ICALL                                         $7      
         15        SEND_VAR                                                 $7
         16        DO_ICALL                                         $8      
         17        CONCAT                                           ~9      $8, '%3Cbr%2F%3E'
         18        ECHO                                                     ~9
    5    19        PRE_INC                                                  !2
         20    >   IS_SMALLER                                               !2, !1
         21      > JMPNZ                                                    ~11, ->8
    6    22    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.64 ms | 1395 KiB | 19 Q