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); } 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 = 28
Branch analysis from position: 28
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 2
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 21
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 2
Branch analysis from position: 30
Branch analysis from position: 2
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 2
Branch analysis from position: 30
Branch analysis from position: 2
filename:       /in/0pTJq
function name:  (null)
number of ops:  31
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                                                      ->28
    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, ->21
   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        SEND_VAR                                                 !1
         17        DO_ICALL                                         $11     
         18        SUB                                              ~12     !0, $11
         19        ASSIGN                                                   !0, ~12
         20      > JMP                                                      ->24
   16    21    >   SUB                                              ~14     !1, 1
         22        ASSIGN_DIM                                               !2, ~14
         23        OP_DATA                                                  0
   18    24    >   SUB                                              ~16     !1, 1
         25        FETCH_DIM_R                                      ~17     !2, ~16
         26        ECHO                                                     ~17
   20    27        PRE_INC                                                  !1
    5    28    >   IS_SMALLER                                               0, !0
         29      > JMPNZ                                                    ~19, ->2
   24    30    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.52 ms | 1396 KiB | 15 Q