3v4l.org

run code in 300+ PHP versions simultaneously
<?php $t = microtime(true); function passgen($l = 12) { $r = ""; $s = "1234567890qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM"; $slen = mb_strlen($s) - 1; for ($i = 0; $i < $l; $i++) { $r .= $s[mt_rand(0, $slen)]; } return $r; } for ($i = 0; $i < 100000; ++$i) passgen(); printf("%0.04f\n", microtime(true) - $t);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 6
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 6
Branch analysis from position: 11
Branch analysis from position: 6
filename:       /in/G63I0
function name:  (null)
number of ops:  20
compiled vars:  !0 = $t, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'microtime'
          1        SEND_VAL                                                 <true>
          2        DO_ICALL                                         $2      
          3        ASSIGN                                                   !0, $2
   14     4        ASSIGN                                                   !1, 0
          5      > JMP                                                      ->9
   15     6    >   INIT_FCALL                                               'passgen'
          7        DO_FCALL                                      0          
   14     8        PRE_INC                                                  !1
          9    >   IS_SMALLER                                               !1, 100000
         10      > JMPNZ                                                    ~7, ->6
   16    11    >   INIT_FCALL                                               'printf'
         12        SEND_VAL                                                 '%250.04f%0A'
         13        INIT_FCALL                                               'microtime'
         14        SEND_VAL                                                 <true>
         15        DO_ICALL                                         $8      
         16        SUB                                              ~9      $8, !0
         17        SEND_VAL                                                 ~9
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Function passgen:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 10
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 10
Branch analysis from position: 19
Branch analysis from position: 10
filename:       /in/G63I0
function name:  passgen
number of ops:  21
compiled vars:  !0 = $l, !1 = $r, !2 = $s, !3 = $slen, !4 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                        !0      12
    5     1        ASSIGN                                                   !1, ''
    6     2        ASSIGN                                                   !2, '1234567890qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM'
    7     3        INIT_FCALL                                               'mb_strlen'
          4        SEND_VAR                                                 !2
          5        DO_ICALL                                         $7      
          6        SUB                                              ~8      $7, 1
          7        ASSIGN                                                   !3, ~8
    8     8        ASSIGN                                                   !4, 0
          9      > JMP                                                      ->17
    9    10    >   INIT_FCALL                                               'mt_rand'
         11        SEND_VAL                                                 0
         12        SEND_VAR                                                 !3
         13        DO_ICALL                                         $11     
         14        FETCH_DIM_R                                      ~12     !2, $11
         15        ASSIGN_OP                                     8          !1, ~12
    8    16        PRE_INC                                                  !4
         17    >   IS_SMALLER                                               !4, !0
         18      > JMPNZ                                                    ~15, ->10
   12    19    > > RETURN                                                   !1
   13    20*     > RETURN                                                   null

End of function passgen

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.17 ms | 1403 KiB | 22 Q