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; $i++; }while($i < $len); echo (string)($sum%11); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 5
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
filename:       /in/OZhQa
function name:  (null)
number of ops:  17
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        PRE_INC                                                  !2
   11    11        IS_SMALLER                                               !2, !1
         12      > JMPNZ                                                    ~16, ->5
   12    13    >   MOD                                              ~17     !3, 11
         14        CAST                                          6  ~18     ~17
         15        ECHO                                                     ~18
   14    16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.2 ms | 1384 KiB | 13 Q