3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "abcdأبتث"; $charsCount = mb_strlen($string); for($i = 0; $i < $charsCount; $i++){ $char = mb_substr($string, $i, 1); var_dump($char); }
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 = 7
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 7
Branch analysis from position: 19
Branch analysis from position: 7
filename:       /in/T9jHd
function name:  (null)
number of ops:  20
compiled vars:  !0 = $string, !1 = $charsCount, !2 = $i, !3 = $char
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'abcd%D8%A3%D8%A8%D8%AA%D8%AB'
    5     1        INIT_FCALL                                               'mb_strlen'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !1, $5
    6     5        ASSIGN                                                   !2, 0
          6      > JMP                                                      ->17
    7     7    >   INIT_FCALL                                               'mb_substr'
          8        SEND_VAR                                                 !0
          9        SEND_VAR                                                 !2
         10        SEND_VAL                                                 1
         11        DO_ICALL                                         $8      
         12        ASSIGN                                                   !3, $8
    8    13        INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !3
         15        DO_ICALL                                                 
    6    16        PRE_INC                                                  !2
         17    >   IS_SMALLER                                               !2, !1
         18      > JMPNZ                                                    ~12, ->7
    9    19    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.23 ms | 1461 KiB | 16 Q