3v4l.org

run code in 300+ PHP versions simultaneously
<?php function generateDigitPassword($length = 8) { $r = ''; for ($i = 0; $i < $length; $i++) $r .= rand(0, 9); return $r; } var_dump(generateDigitPassword());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KkgKs
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'generatedigitpassword'
          2        DO_FCALL                                      0  $0      
          3        SEND_VAR                                                 $0
          4        DO_ICALL                                                 
          5      > RETURN                                                   1

Function generatedigitpassword:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 4
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 4
Branch analysis from position: 12
Branch analysis from position: 4
filename:       /in/KkgKs
function name:  generateDigitPassword
number of ops:  14
compiled vars:  !0 = $length, !1 = $r, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV_INIT                                        !0      8
    4     1        ASSIGN                                                   !1, ''
    5     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->10
    6     4    >   INIT_FCALL                                               'rand'
          5        SEND_VAL                                                 0
          6        SEND_VAL                                                 9
          7        DO_ICALL                                         $5      
          8        ASSIGN_OP                                     8          !1, $5
    5     9        PRE_INC                                                  !2
         10    >   IS_SMALLER                                               !2, !0
         11      > JMPNZ                                                    ~8, ->4
    7    12    > > RETURN                                                   !1
    8    13*     > RETURN                                                   null

End of function generatedigitpassword

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.75 ms | 1398 KiB | 18 Q