3v4l.org

run code in 300+ PHP versions simultaneously
<?php // convert decimal to base 2 without using base_convert $base = 2; $num = 23; while( $num > 0) { $arr[] = $num % $base; // store remainder in array $num = floor($num/$base); // no integer division } var_dump($arr,$num);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
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/1MFHc
function name:  (null)
number of ops:  18
compiled vars:  !0 = $base, !1 = $num, !2 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 2
    4     1        ASSIGN                                                   !1, 23
    6     2      > JMP                                                      ->11
    8     3    >   MOD                                              ~6      !1, !0
          4        ASSIGN_DIM                                               !2
          5        OP_DATA                                                  ~6
    9     6        INIT_FCALL                                               'floor'
          7        DIV                                              ~7      !1, !0
          8        SEND_VAL                                                 ~7
          9        DO_ICALL                                         $8      
         10        ASSIGN                                                   !1, $8
    6    11    >   IS_SMALLER                                               0, !1
         12      > JMPNZ                                                    ~10, ->3
   11    13    >   INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !2
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.43 ms | 1395 KiB | 17 Q