3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dec = 24; $bin = null; while($dec != 0) { $bin = ($dec % 2) . $bin; $dec = $dec >> 1; } echo $bin . PHP_EOL; $dec = 19; $bin = null; while($dec != 0) { $bin = ($dec % 2) . $bin; $dec = intdiv($dec, 2); } echo $bin . PHP_EOL; $dec = 37; $bin = null; while($dec != 0) { $bin = ($dec % 2) . $bin; $dec = intval($dec / 2); } echo $bin . PHP_EOL; $dec = 17; $bin = null; while($dec != 0) { $bin = ($dec % 2) . $bin; $dec = floor($dec / 2); } echo $bin . PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 3
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 15
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
2 jumps found. (Code = 44) Position 1 = 38, Position 2 = 30
Branch analysis from position: 38
1 jumps found. (Code = 42) Position 1 = 51
Branch analysis from position: 51
2 jumps found. (Code = 44) Position 1 = 53, Position 2 = 43
Branch analysis from position: 53
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 43
2 jumps found. (Code = 44) Position 1 = 53, Position 2 = 43
Branch analysis from position: 53
Branch analysis from position: 43
Branch analysis from position: 30
2 jumps found. (Code = 44) Position 1 = 38, Position 2 = 30
Branch analysis from position: 38
Branch analysis from position: 30
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 15
Branch analysis from position: 25
Branch analysis from position: 15
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 3
Branch analysis from position: 10
Branch analysis from position: 3
filename:       /in/MsVZe
function name:  (null)
number of ops:  56
compiled vars:  !0 = $dec, !1 = $bin
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 24
    5     1        ASSIGN                                                   !1, null
    7     2      > JMP                                                      ->8
    9     3    >   MOD                                              ~4      !0, 2
          4        CONCAT                                           ~5      ~4, !1
          5        ASSIGN                                                   !1, ~5
   10     6        SR                                               ~7      !0, 1
          7        ASSIGN                                                   !0, ~7
    7     8    >   IS_NOT_EQUAL                                             !0, 0
          9      > JMPNZ                                                    ~9, ->3
   13    10    >   CONCAT                                           ~10     !1, '%0A'
         11        ECHO                                                     ~10
   15    12        ASSIGN                                                   !0, 19
   17    13        ASSIGN                                                   !1, null
   19    14      > JMP                                                      ->23
   21    15    >   MOD                                              ~13     !0, 2
         16        CONCAT                                           ~14     ~13, !1
         17        ASSIGN                                                   !1, ~14
   22    18        INIT_FCALL                                               'intdiv'
         19        SEND_VAR                                                 !0
         20        SEND_VAL                                                 2
         21        DO_ICALL                                         $16     
         22        ASSIGN                                                   !0, $16
   19    23    >   IS_NOT_EQUAL                                             !0, 0
         24      > JMPNZ                                                    ~18, ->15
   25    25    >   CONCAT                                           ~19     !1, '%0A'
         26        ECHO                                                     ~19
   27    27        ASSIGN                                                   !0, 37
   29    28        ASSIGN                                                   !1, null
   31    29      > JMP                                                      ->36
   33    30    >   MOD                                              ~22     !0, 2
         31        CONCAT                                           ~23     ~22, !1
         32        ASSIGN                                                   !1, ~23
   34    33        DIV                                              ~25     !0, 2
         34        CAST                                          4  ~26     ~25
         35        ASSIGN                                                   !0, ~26
   31    36    >   IS_NOT_EQUAL                                             !0, 0
         37      > JMPNZ                                                    ~28, ->30
   37    38    >   CONCAT                                           ~29     !1, '%0A'
         39        ECHO                                                     ~29
   39    40        ASSIGN                                                   !0, 17
   41    41        ASSIGN                                                   !1, null
   43    42      > JMP                                                      ->51
   45    43    >   MOD                                              ~32     !0, 2
         44        CONCAT                                           ~33     ~32, !1
         45        ASSIGN                                                   !1, ~33
   46    46        INIT_FCALL                                               'floor'
         47        DIV                                              ~35     !0, 2
         48        SEND_VAL                                                 ~35
         49        DO_ICALL                                         $36     
         50        ASSIGN                                                   !0, $36
   43    51    >   IS_NOT_EQUAL                                             !0, 0
         52      > JMPNZ                                                    ~38, ->43
   49    53    >   CONCAT                                           ~39     !1, '%0A'
         54        ECHO                                                     ~39
   50    55      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.05 ms | 1016 KiB | 15 Q