3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'Текст для опытов'; $newStr = ''; for($i = 0, $size = mb_strlen($str); $i < $size; ++$i) { if ($i % 2 == 0) { $newStr .= mb_strtoupper(mb_substr($str, $i, 1)); } else { $newStr .= mb_strtolower(mb_substr($str, $i, 1)); } } echo $newStr;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
2 jumps found. (Code = 44) Position 1 = 33, Position 2 = 8
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 21
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
2 jumps found. (Code = 44) Position 1 = 33, Position 2 = 8
Branch analysis from position: 33
Branch analysis from position: 8
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 33, Position 2 = 8
Branch analysis from position: 33
Branch analysis from position: 8
filename:       /in/Lmqs8
function name:  (null)
number of ops:  35
compiled vars:  !0 = $str, !1 = $newStr, !2 = $i, !3 = $size
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%D0%A2%D0%B5%D0%BA%D1%81%D1%82+%D0%B4%D0%BB%D1%8F+%D0%BE%D0%BF%D1%8B%D1%82%D0%BE%D0%B2'
    4     1        ASSIGN                                                   !1, ''
    5     2        ASSIGN                                                   !2, 0
          3        INIT_FCALL                                               'mb_strlen'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $7      
          6        ASSIGN                                                   !3, $7
          7      > JMP                                                      ->31
    6     8    >   MOD                                              ~9      !2, 2
          9        IS_EQUAL                                                 ~9, 0
         10      > JMPZ                                                     ~10, ->21
    7    11    >   INIT_FCALL                                               'mb_strtoupper'
         12        INIT_FCALL                                               'mb_substr'
         13        SEND_VAR                                                 !0
         14        SEND_VAR                                                 !2
         15        SEND_VAL                                                 1
         16        DO_ICALL                                         $11     
         17        SEND_VAR                                                 $11
         18        DO_ICALL                                         $12     
         19        ASSIGN_OP                                     8          !1, $12
         20      > JMP                                                      ->30
   10    21    >   INIT_FCALL                                               'mb_strtolower'
         22        INIT_FCALL                                               'mb_substr'
         23        SEND_VAR                                                 !0
         24        SEND_VAR                                                 !2
         25        SEND_VAL                                                 1
         26        DO_ICALL                                         $14     
         27        SEND_VAR                                                 $14
         28        DO_ICALL                                         $15     
         29        ASSIGN_OP                                     8          !1, $15
    5    30    >   PRE_INC                                                  !2
         31    >   IS_SMALLER                                               !2, !3
         32      > JMPNZ                                                    ~18, ->8
   13    33    >   ECHO                                                     !1
   14    34      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.29 ms | 1396 KiB | 21 Q