3v4l.org

run code in 300+ PHP versions simultaneously
<?php $i = 50; 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; $power++; endwhile; print $bin; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 2
Branch analysis from position: 27
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 = 27, Position 2 = 2
Branch analysis from position: 27
Branch analysis from position: 2
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 2
Branch analysis from position: 27
Branch analysis from position: 2
filename:       /in/ncCJa
function name:  (null)
number of ops:  29
compiled vars:  !0 = $i, !1 = $power, !2 = $bin
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 50
    5     1      > JMP                                                      ->25
    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    >   PRE_INC                                                  !1
    5    25    >   IS_SMALLER                                               0, !0
         26      > JMPNZ                                                    ~17, ->2
   22    27    >   ECHO                                                     !2
   24    28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.83 ms | 1396 KiB | 15 Q