3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Bob Jenkins' One-At-A-Time hashing algorithm. function jenkins_hash($key) { $key = (string)$key; $len = strlen($key); for($hash = $i = 0; $i < $len; ++$i) { $hash += ord($key[$i]); $hash += ($hash << 10); $hash ^= ($hash >> 6); } $hash += ($hash << 3); $hash ^= ($hash >> 11); $hash += ($hash << 15); return str_pad(dechex($hash),16,0,STR_PAD_LEFT); } jenkins_hash("3v4l.org is an online shell that allows you to evaluate (hence 3v4l) your code on my server.");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MY3LF
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_FCALL                                               'jenkins_hash'
          1        SEND_VAL                                                 '3v4l.org+is+an+online+shell+that+allows+you+to+evaluate+%28hence+3v4l%29+your+code+on+my+server.'
          2        DO_FCALL                                      0          
          3      > RETURN                                                   1

Function jenkins_hash:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 8
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 8
Branch analysis from position: 20
Branch analysis from position: 8
filename:       /in/MY3LF
function name:  jenkins_hash
number of ops:  37
compiled vars:  !0 = $key, !1 = $len, !2 = $hash, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        CAST                                          6  ~4      !0
          2        ASSIGN                                                   !0, ~4
    6     3        STRLEN                                           ~6      !0
          4        ASSIGN                                                   !1, ~6
    7     5        ASSIGN                                           ~8      !3, 0
          6        ASSIGN                                                   !2, ~8
          7      > JMP                                                      ->18
    8     8    >   INIT_FCALL                                               'ord'
          9        FETCH_DIM_R                                      ~10     !0, !3
         10        SEND_VAL                                                 ~10
         11        DO_ICALL                                         $11     
         12        ASSIGN_OP                                     1          !2, $11
    9    13        SL                                               ~13     !2, 10
         14        ASSIGN_OP                                     1          !2, ~13
   10    15        SR                                               ~15     !2, 6
         16        ASSIGN_OP                                    11          !2, ~15
    7    17        PRE_INC                                                  !3
         18    >   IS_SMALLER                                               !3, !1
         19      > JMPNZ                                                    ~18, ->8
   12    20    >   SL                                               ~19     !2, 3
         21        ASSIGN_OP                                     1          !2, ~19
   13    22        SR                                               ~21     !2, 11
         23        ASSIGN_OP                                    11          !2, ~21
   14    24        SL                                               ~23     !2, 15
         25        ASSIGN_OP                                     1          !2, ~23
   15    26        INIT_FCALL                                               'str_pad'
         27        INIT_FCALL                                               'dechex'
         28        SEND_VAR                                                 !2
         29        DO_ICALL                                         $25     
         30        SEND_VAR                                                 $25
         31        SEND_VAL                                                 16
         32        SEND_VAL                                                 0
         33        SEND_VAL                                                 0
         34        DO_ICALL                                         $26     
         35      > RETURN                                                   $26
   16    36*     > RETURN                                                   null

End of function jenkins_hash

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.97 ms | 1403 KiB | 20 Q