3v4l.org

run code in 300+ PHP versions simultaneously
<?php $hash = md5('haha'); // generate a random string $arr = str_split('ABCDEFGHIJKLMNOP'); // get all the characters into an array shuffle($arr); // randomize the array $arr = array_slice($arr, 0, 6); // get the first six (random) characters out $str = implode('', $arr); // smush them back into a string // return the file name echo hexdec(substr(sha1($str), 0, 7)) . $hash;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oFleL
function name:  (null)
number of ops:  36
compiled vars:  !0 = $hash, !1 = $arr, !2 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'md5'
          1        SEND_VAL                                                 'haha'
          2        DO_ICALL                                         $3      
          3        ASSIGN                                                   !0, $3
    7     4        INIT_FCALL                                               'str_split'
          5        SEND_VAL                                                 'ABCDEFGHIJKLMNOP'
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !1, $5
    8     8        INIT_FCALL                                               'shuffle'
          9        SEND_REF                                                 !1
         10        DO_ICALL                                                 
    9    11        INIT_FCALL                                               'array_slice'
         12        SEND_VAR                                                 !1
         13        SEND_VAL                                                 0
         14        SEND_VAL                                                 6
         15        DO_ICALL                                         $8      
         16        ASSIGN                                                   !1, $8
   10    17        INIT_FCALL                                               'implode'
         18        SEND_VAL                                                 ''
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                         $10     
         21        ASSIGN                                                   !2, $10
   13    22        INIT_FCALL                                               'hexdec'
         23        INIT_FCALL                                               'substr'
         24        INIT_FCALL                                               'sha1'
         25        SEND_VAR                                                 !2
         26        DO_ICALL                                         $12     
         27        SEND_VAR                                                 $12
         28        SEND_VAL                                                 0
         29        SEND_VAL                                                 7
         30        DO_ICALL                                         $13     
         31        SEND_VAR                                                 $13
         32        DO_ICALL                                         $14     
         33        CONCAT                                           ~15     $14, !0
         34        ECHO                                                     ~15
         35      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.94 ms | 1401 KiB | 29 Q