3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = 'promiƈ'; $s = mb_strtolower($s, 'utf8'); $ln = mb_strlen($s, 'utf8'); $i = 0; do { $b = decbin($i); $p = strrev(str_pad((string) $b, $ln, '0', STR_PAD_LEFT)); $r = ''; for ($j = 0; $j < strlen($p); $j++) { $ch = mb_substr($s, $j, 1, 'utf8'); $r .= $p[$j] ? mb_strtoupper($ch, 'utf8') : $ch; } echo $r . "\n"; if ($p === str_repeat('1', $ln)) { break; } $i++; } while (true);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 48
Branch analysis from position: 48
2 jumps found. (Code = 44) Position 1 = 51, Position 2 = 30
Branch analysis from position: 51
2 jumps found. (Code = 43) Position 1 = 59, Position 2 = 60
Branch analysis from position: 59
1 jumps found. (Code = 42) Position 1 = 62
Branch analysis from position: 62
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 60
2 jumps found. (Code = 44) Position 1 = 62, Position 2 = 12
Branch analysis from position: 62
Branch analysis from position: 12
Branch analysis from position: 30
2 jumps found. (Code = 43) Position 1 = 39, Position 2 = 45
Branch analysis from position: 39
1 jumps found. (Code = 42) Position 1 = 46
Branch analysis from position: 46
2 jumps found. (Code = 44) Position 1 = 51, Position 2 = 30
Branch analysis from position: 51
Branch analysis from position: 30
Branch analysis from position: 45
2 jumps found. (Code = 44) Position 1 = 51, Position 2 = 30
Branch analysis from position: 51
Branch analysis from position: 30
filename:       /in/QKGQX
function name:  (null)
number of ops:  63
compiled vars:  !0 = $s, !1 = $ln, !2 = $i, !3 = $b, !4 = $p, !5 = $r, !6 = $j, !7 = $ch
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'promi%C5%88'
    5     1        INIT_FCALL                                               'mb_strtolower'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 'utf8'
          4        DO_ICALL                                         $9      
          5        ASSIGN                                                   !0, $9
    6     6        INIT_FCALL                                               'mb_strlen'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 'utf8'
          9        DO_ICALL                                         $11     
         10        ASSIGN                                                   !1, $11
    7    11        ASSIGN                                                   !2, 0
    9    12    >   INIT_FCALL                                               'decbin'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                         $14     
         15        ASSIGN                                                   !3, $14
   10    16        INIT_FCALL                                               'strrev'
         17        INIT_FCALL                                               'str_pad'
         18        CAST                                          6  ~16     !3
         19        SEND_VAL                                                 ~16
         20        SEND_VAR                                                 !1
         21        SEND_VAL                                                 '0'
         22        SEND_VAL                                                 0
         23        DO_ICALL                                         $17     
         24        SEND_VAR                                                 $17
         25        DO_ICALL                                         $18     
         26        ASSIGN                                                   !4, $18
   12    27        ASSIGN                                                   !5, ''
   13    28        ASSIGN                                                   !6, 0
         29      > JMP                                                      ->48
   14    30    >   INIT_FCALL                                               'mb_substr'
         31        SEND_VAR                                                 !0
         32        SEND_VAR                                                 !6
         33        SEND_VAL                                                 1
         34        SEND_VAL                                                 'utf8'
         35        DO_ICALL                                         $22     
         36        ASSIGN                                                   !7, $22
   15    37        FETCH_DIM_R                                      ~24     !4, !6
         38      > JMPZ                                                     ~24, ->45
         39    >   INIT_FCALL                                               'mb_strtoupper'
         40        SEND_VAR                                                 !7
         41        SEND_VAL                                                 'utf8'
         42        DO_ICALL                                         $25     
         43        QM_ASSIGN                                        ~26     $25
         44      > JMP                                                      ->46
         45    >   QM_ASSIGN                                        ~26     !7
         46    >   ASSIGN_OP                                     8          !5, ~26
   13    47        PRE_INC                                                  !6
         48    >   STRLEN                                           ~29     !4
         49        IS_SMALLER                                               !6, ~29
         50      > JMPNZ                                                    ~30, ->30
   17    51    >   CONCAT                                           ~31     !5, '%0A'
         52        ECHO                                                     ~31
   19    53        INIT_FCALL                                               'str_repeat'
         54        SEND_VAL                                                 '1'
         55        SEND_VAR                                                 !1
         56        DO_ICALL                                         $32     
         57        IS_IDENTICAL                                             !4, $32
         58      > JMPZ                                                     ~33, ->60
   20    59    > > JMP                                                      ->62
   22    60    >   PRE_INC                                                  !2
   23    61      > JMPNZ                                                    <true>, ->12
         62    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.12 ms | 1400 KiB | 29 Q