3v4l.org

run code in 300+ PHP versions simultaneously
<?php function GeneratePassword($i,$s){ $r='';$s=str_split($s); for($i; $i>0; $i--)$r.=array_rand($s); return $r; } GeneratePassword(5,'wffweg');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SeSVZ
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'generatepassword'
          1        SEND_VAL                                                 5
          2        SEND_VAL                                                 'wffweg'
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Function generatepassword:
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 = 15, Position 2 = 8
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 8
Branch analysis from position: 15
Branch analysis from position: 8
filename:       /in/SeSVZ
function name:  GeneratePassword
number of ops:  17
compiled vars:  !0 = $i, !1 = $s, !2 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    3     2        ASSIGN                                                   !2, ''
          3        INIT_FCALL                                               'str_split'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $4      
          6        ASSIGN                                                   !1, $4
    4     7      > JMP                                                      ->13
          8    >   INIT_FCALL                                               'array_rand'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $6      
         11        ASSIGN_OP                                     8          !2, $6
         12        PRE_DEC                                                  !0
         13    >   IS_SMALLER                                               0, !0
         14      > JMPNZ                                                    ~9, ->8
    5    15    > > RETURN                                                   !2
    6    16*     > RETURN                                                   null

End of function generatepassword

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.66 ms | 1398 KiB | 18 Q