3v4l.org

run code in 300+ PHP versions simultaneously
<?php function generate_string ($length = 20) { $nps = ""; for($i=0;$i<$length;$i++) { $nps .= chr( (mt_rand(1, 36) <= 26) ? mt_rand(97, 122) : mt_rand(48, 57 )); } return $nps; printf($nps);} ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UNjhC
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E > > RETURN                                                   1

Function generate_string:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 4
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 17
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 4
Branch analysis from position: 28
Branch analysis from position: 4
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 4
Branch analysis from position: 28
Branch analysis from position: 4
filename:       /in/UNjhC
function name:  generate_string
number of ops:  33
compiled vars:  !0 = $length, !1 = $nps, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV_INIT                                        !0      20
    4     1        ASSIGN                                                   !1, ''
    5     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->26
    7     4    >   INIT_FCALL                                               'chr'
          5        INIT_FCALL                                               'mt_rand'
          6        SEND_VAL                                                 1
          7        SEND_VAL                                                 36
          8        DO_ICALL                                         $5      
          9        IS_SMALLER_OR_EQUAL                                      $5, 26
         10      > JMPZ                                                     ~6, ->17
         11    >   INIT_FCALL                                               'mt_rand'
         12        SEND_VAL                                                 97
         13        SEND_VAL                                                 122
         14        DO_ICALL                                         $7      
         15        QM_ASSIGN                                        ~8      $7
         16      > JMP                                                      ->22
         17    >   INIT_FCALL                                               'mt_rand'
         18        SEND_VAL                                                 48
         19        SEND_VAL                                                 57
         20        DO_ICALL                                         $9      
         21        QM_ASSIGN                                        ~8      $9
         22    >   SEND_VAL                                                 ~8
         23        DO_ICALL                                         $10     
         24        ASSIGN_OP                                     8          !1, $10
    5    25        PRE_INC                                                  !2
         26    >   IS_SMALLER                                               !2, !0
         27      > JMPNZ                                                    ~13, ->4
    9    28    > > RETURN                                                   !1
   10    29*       INIT_FCALL                                               'printf'
         30*       SEND_VAR                                                 !1
         31*       DO_ICALL                                                 
         32*     > RETURN                                                   null

End of function generate_string

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.06 ms | 1400 KiB | 19 Q