3v4l.org

run code in 300+ PHP versions simultaneously
<?php $code = "03255000000"; $len = strlen($code); $i = 0; $sum = 0; do { $r = $i+1; $sum += $code[$i]*$r; echo "$r:$sum<br>"; $i++; }while($i < $len); echo (string)($sum%11); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 5
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
filename:       /in/flg0B
function name:  (null)
number of ops:  22
compiled vars:  !0 = $code, !1 = $len, !2 = $i, !3 = $sum, !4 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '03255000000'
    3     1        STRLEN                                           ~6      !0
          2        ASSIGN                                                   !1, ~6
    4     3        ASSIGN                                                   !2, 0
    5     4        ASSIGN                                                   !3, 0
    8     5    >   ADD                                              ~10     !2, 1
          6        ASSIGN                                                   !4, ~10
    9     7        FETCH_DIM_R                                      ~12     !0, !2
          8        MUL                                              ~13     !4, ~12
          9        ASSIGN_OP                                     1          !3, ~13
   10    10        ROPE_INIT                                     4  ~16     !4
         11        ROPE_ADD                                      1  ~16     ~16, '%3A'
         12        ROPE_ADD                                      2  ~16     ~16, !3
         13        ROPE_END                                      3  ~15     ~16, '%3Cbr%3E'
         14        ECHO                                                     ~15
   12    15        PRE_INC                                                  !2
   13    16        IS_SMALLER                                               !2, !1
         17      > JMPNZ                                                    ~19, ->5
   14    18    >   MOD                                              ~20     !3, 11
         19        CAST                                          6  ~21     ~20
         20        ECHO                                                     ~21
   16    21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.16 ms | 1394 KiB | 13 Q