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); $cat = join('',array_reverse($arr)); var_dump($cat);
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/KLYA5
function name:  (null)
number of ops:  28
compiled vars:  !0 = $base, !1 = $num, !2 = $arr, !3 = $cat
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                                              ~7      !1, !0
          4        ASSIGN_DIM                                               !2
          5        OP_DATA                                                  ~7
    9     6        INIT_FCALL                                               'floor'
          7        DIV                                              ~8      !1, !0
          8        SEND_VAL                                                 ~8
          9        DO_ICALL                                         $9      
         10        ASSIGN                                                   !1, $9
    6    11    >   IS_SMALLER                                               0, !1
         12      > JMPNZ                                                    ~11, ->3
   11    13    >   INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !2
         15        DO_ICALL                                                 
   12    16        INIT_FCALL                                               'join'
         17        SEND_VAL                                                 ''
         18        INIT_FCALL                                               'array_reverse'
         19        SEND_VAR                                                 !2
         20        DO_ICALL                                         $13     
         21        SEND_VAR                                                 $13
         22        DO_ICALL                                         $14     
         23        ASSIGN                                                   !3, $14
   13    24        INIT_FCALL                                               'var_dump'
         25        SEND_VAR                                                 !3
         26        DO_ICALL                                                 
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.85 ms | 1395 KiB | 21 Q