3v4l.org

run code in 300+ PHP versions simultaneously
<?php function bcdechex($dec) { $last = bcmod($dec, 16); $remain = bcdiv(bcsub($dec, $last), 16); if($remain == 0) { return dechex($last); } else { return bcdechex($remain).dechex($last); } } print bcdechex(319259235818);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/a5O8G
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'bcdechex'
          1        SEND_VAL                                                 319259235818
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function bcdechex:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 22
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/a5O8G
function name:  bcdechex
number of ops:  31
compiled vars:  !0 = $dec, !1 = $last, !2 = $remain
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL_BY_NAME                                       'bcmod'
          2        SEND_VAR_EX                                              !0
          3        SEND_VAL_EX                                              16
          4        DO_FCALL                                      0  $3      
          5        ASSIGN                                                   !1, $3
    5     6        INIT_FCALL_BY_NAME                                       'bcdiv'
          7        INIT_FCALL_BY_NAME                                       'bcsub'
          8        SEND_VAR_EX                                              !0
          9        SEND_VAR_EX                                              !1
         10        DO_FCALL                                      0  $5      
         11        SEND_VAR_NO_REF_EX                                       $5
         12        SEND_VAL_EX                                              16
         13        DO_FCALL                                      0  $6      
         14        ASSIGN                                                   !2, $6
    7    15        IS_EQUAL                                                 !2, 0
         16      > JMPZ                                                     ~8, ->22
    8    17    >   INIT_FCALL                                               'dechex'
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                         $9      
         20      > RETURN                                                   $9
         21*       JMP                                                      ->30
   10    22    >   INIT_FCALL_BY_NAME                                       'bcdechex'
         23        SEND_VAR_EX                                              !2
         24        DO_FCALL                                      0  $10     
         25        INIT_FCALL                                               'dechex'
         26        SEND_VAR                                                 !1
         27        DO_ICALL                                         $11     
         28        CONCAT                                           ~12     $10, $11
         29      > RETURN                                                   ~12
   12    30*     > RETURN                                                   null

End of function bcdechex

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.28 ms | 1399 KiB | 16 Q