3v4l.org

run code in 300+ PHP versions simultaneously
<?php function dec2hex($number) { $hexvalues = array('0','1','2','3','4','5','6','7', '8','9','A','B','C','D','E','F'); $hexval = ''; while($number != '0') { $hexval = $hexvalues[bcmod($number,'16')].$hexval; $number = bcdiv($number,'16',0); } return $hexval; } $id = 14910855968770314426; var_dump($id); $guid = dec2hex($id); var_dump($guid);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VshGD
function name:  (null)
number of ops:  12
compiled vars:  !0 = $id, !1 = $guid
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   ASSIGN                                                   !0, 1.49109e+19
   17     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
   18     4        INIT_FCALL                                               'dec2hex'
          5        SEND_VAR                                                 !0
          6        DO_FCALL                                      0  $4      
          7        ASSIGN                                                   !1, $4
   19     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Function dec2hex:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 4
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 4
Branch analysis from position: 19
Branch analysis from position: 4
filename:       /in/VshGD
function name:  dec2hex
number of ops:  21
compiled vars:  !0 = $number, !1 = $hexvalues, !2 = $hexval
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        ASSIGN                                                   !1, <array>
    7     2        ASSIGN                                                   !2, ''
    8     3      > JMP                                                      ->17
   10     4    >   INIT_FCALL_BY_NAME                                       'bcmod'
          5        SEND_VAR_EX                                              !0
          6        SEND_VAL_EX                                              '16'
          7        DO_FCALL                                      0  $5      
          8        FETCH_DIM_R                                      ~6      !1, $5
          9        CONCAT                                           ~7      ~6, !2
         10        ASSIGN                                                   !2, ~7
   11    11        INIT_FCALL_BY_NAME                                       'bcdiv'
         12        SEND_VAR_EX                                              !0
         13        SEND_VAL_EX                                              '16'
         14        SEND_VAL_EX                                              0
         15        DO_FCALL                                      0  $9      
         16        ASSIGN                                                   !0, $9
    8    17    >   IS_NOT_EQUAL                                             !0, '0'
         18      > JMPNZ                                                    ~11, ->4
   13    19    > > RETURN                                                   !2
   14    20*     > RETURN                                                   null

End of function dec2hex

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.4 ms | 1390 KiB | 16 Q