3v4l.org

run code in 300+ PHP versions simultaneously
<?php class HashUtil { const MULTIPLIER = 44928000; const NORMAL_BASE = 10; const TARGET_BASE = 31; public static function encode($entityId) { return base_convert($entityId ^ self::MULTIPLIER, self::NORMAL_BASE, self::TARGET_BASE); } public static function decode($hash) { return intval($hash, self::TARGET_BASE) ^ self::MULTIPLIER; } } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QCuJX
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E > > RETURN                                                   1

Class HashUtil:
Function encode:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QCuJX
function name:  encode
number of ops:  9
compiled vars:  !0 = $entityId
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   11     1        INIT_FCALL                                               'base_convert'
          2        BW_XOR                                           ~1      !0, 44928000
          3        SEND_VAL                                                 ~1
          4        SEND_VAL                                                 10
          5        SEND_VAL                                                 31
          6        DO_ICALL                                         $2      
          7      > RETURN                                                   $2
   12     8*     > RETURN                                                   null

End of function encode

Function decode:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QCuJX
function name:  decode
number of ops:  8
compiled vars:  !0 = $hash
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
   16     1        INIT_FCALL                                               'intval'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 31
          4        DO_ICALL                                         $1      
          5        BW_XOR                                           ~2      $1, 44928000
          6      > RETURN                                                   ~2
   17     7*     > RETURN                                                   null

End of function decode

End of class HashUtil.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.92 ms | 1399 KiB | 17 Q