3v4l.org

run code in 300+ PHP versions simultaneously
<?php $v = 111111; $t = 0; while($v){ $g = (int) $v / 10; $n = $g * 10; $d = $v - $n; $v = $g; $t += $d; } echo $t;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 3
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 3
Branch analysis from position: 13
Branch analysis from position: 3
filename:       /in/tEoIC
function name:  (null)
number of ops:  15
compiled vars:  !0 = $v, !1 = $t, !2 = $g, !3 = $n, !4 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 111111
    5     1        ASSIGN                                                   !1, 0
    6     2      > JMP                                                      ->12
    7     3    >   CAST                                          4  ~7      !0
          4        DIV                                              ~8      ~7, 10
          5        ASSIGN                                                   !2, ~8
    8     6        MUL                                              ~10     !2, 10
          7        ASSIGN                                                   !3, ~10
    9     8        SUB                                              ~12     !0, !3
          9        ASSIGN                                                   !4, ~12
   10    10        ASSIGN                                                   !0, !2
   11    11        ASSIGN_OP                                     1          !1, !4
    6    12    > > JMPNZ                                                    !0, ->3
   14    13    >   ECHO                                                     !1
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
188.42 ms | 1393 KiB | 13 Q