3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "Şef"; for ($x = 0; $x < 1000; ++$x) { $length = iconv_strlen($str, 'utf-8'); for ($i = 0; $i < $length; $i++) { echo iconv_substr($str, $i, 1, 'utf-8').'<br>'; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 3
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 10
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 3
Branch analysis from position: 24
Branch analysis from position: 3
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 10
Branch analysis from position: 21
Branch analysis from position: 10
filename:       /in/oZeOK
function name:  (null)
number of ops:  25
compiled vars:  !0 = $str, !1 = $x, !2 = $length, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%C5%9Eef'
    5     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->22
    6     3    >   INIT_FCALL_BY_NAME                                       'iconv_strlen'
          4        SEND_VAR_EX                                              !0
          5        SEND_VAL_EX                                              'utf-8'
          6        DO_FCALL                                      0  $6      
          7        ASSIGN                                                   !2, $6
    7     8        ASSIGN                                                   !3, 0
          9      > JMP                                                      ->19
    8    10    >   INIT_FCALL_BY_NAME                                       'iconv_substr'
         11        SEND_VAR_EX                                              !0
         12        SEND_VAR_EX                                              !3
         13        SEND_VAL_EX                                              1
         14        SEND_VAL_EX                                              'utf-8'
         15        DO_FCALL                                      0  $9      
         16        CONCAT                                           ~10     $9, '%3Cbr%3E'
         17        ECHO                                                     ~10
    7    18        PRE_INC                                                  !3
         19    >   IS_SMALLER                                               !3, !2
         20      > JMPNZ                                                    ~12, ->10
    5    21    >   PRE_INC                                                  !1
         22    >   IS_SMALLER                                               !1, 1000
         23      > JMPNZ                                                    ~14, ->3
   10    24    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.41 ms | 1386 KiB | 13 Q