3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getSeed($data) { $seed = ""; for ($i = 0; $i < strlen($data); $i++) { $val = ord($data[$i]); $seed = $seed."$val"; } return $seed; } $seed = getSeed("admin"); srand(intval($seed)); /* Seed random number generator */ $uid = rand(); echo $uid; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mgtOV
function name:  (null)
number of ops:  13
compiled vars:  !0 = $seed, !1 = $uid
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'getseed'
          1        SEND_VAL                                                 'admin'
          2        DO_FCALL                                      0  $2      
          3        ASSIGN                                                   !0, $2
   11     4        INIT_FCALL                                               'srand'
          5        CAST                                          4  ~4      !0
          6        SEND_VAL                                                 ~4
          7        DO_ICALL                                                 
   12     8        INIT_FCALL                                               'rand'
          9        DO_ICALL                                         $6      
         10        ASSIGN                                                   !1, $6
   13    11        ECHO                                                     !1
   14    12      > RETURN                                                   1

Function getseed:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 4
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 4
Branch analysis from position: 16
Branch analysis from position: 4
filename:       /in/mgtOV
function name:  getSeed
number of ops:  18
compiled vars:  !0 = $data, !1 = $seed, !2 = $i, !3 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        ASSIGN                                                   !1, ''
    4     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->13
    5     4    >   INIT_FCALL                                               'ord'
          5        FETCH_DIM_R                                      ~6      !0, !2
          6        SEND_VAL                                                 ~6
          7        DO_ICALL                                         $7      
          8        ASSIGN                                                   !3, $7
    6     9        CAST                                          6  ~9      !3
         10        CONCAT                                           ~10     !1, ~9
         11        ASSIGN                                                   !1, ~10
    4    12        PRE_INC                                                  !2
         13    >   STRLEN                                           ~13     !0
         14        IS_SMALLER                                               !2, ~13
         15      > JMPNZ                                                    ~14, ->4
    8    16    > > RETURN                                                   !1
    9    17*     > RETURN                                                   null

End of function getseed

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.29 ms | 1390 KiB | 20 Q