3v4l.org

run code in 300+ PHP versions simultaneously
<?php $i = 5; while ($i > 0): $power = 1; $bin = array(); if ($i / pow(2,$power) != 0) { $bin[$power - 1] = 1; $i = $i - pow(2,$power-1); } else $bin[$power - 1] = 0; print $bin[$power - 1]; $power++; endwhile; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
2 jumps found. (Code = 44) Position 1 = 31, Position 2 = 2
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 22
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 31, Position 2 = 2
Branch analysis from position: 31
Branch analysis from position: 2
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 31, Position 2 = 2
Branch analysis from position: 31
Branch analysis from position: 2
filename:       /in/7VXVB
function name:  (null)
number of ops:  32
compiled vars:  !0 = $i, !1 = $power, !2 = $bin
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 5
    5     1      > JMP                                                      ->29
    7     2    >   ASSIGN                                                   !1, 1
    9     3        ASSIGN                                                   !2, <array>
   11     4        INIT_FCALL                                               'pow'
          5        SEND_VAL                                                 2
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $6      
          8        DIV                                              ~7      !0, $6
          9        IS_NOT_EQUAL                                             ~7, 0
         10      > JMPZ                                                     ~8, ->22
   12    11    >   SUB                                              ~9      !1, 1
         12        ASSIGN_DIM                                               !2, ~9
         13        OP_DATA                                                  1
   13    14        INIT_FCALL                                               'pow'
         15        SEND_VAL                                                 2
         16        SUB                                              ~11     !1, 1
         17        SEND_VAL                                                 ~11
         18        DO_ICALL                                         $12     
         19        SUB                                              ~13     !0, $12
         20        ASSIGN                                                   !0, ~13
         21      > JMP                                                      ->25
   16    22    >   SUB                                              ~15     !1, 1
         23        ASSIGN_DIM                                               !2, ~15
         24        OP_DATA                                                  0
   18    25    >   SUB                                              ~17     !1, 1
         26        FETCH_DIM_R                                      ~18     !2, ~17
         27        ECHO                                                     ~18
   20    28        PRE_INC                                                  !1
    5    29    >   IS_SMALLER                                               0, !0
         30      > JMPNZ                                                    ~20, ->2
   24    31    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.63 ms | 1396 KiB | 15 Q