3v4l.org

run code in 300+ PHP versions simultaneously
<?php function mt_rand_str ($l, $c = '1234567890') { for ($s = '', $cl = strlen($c)-1, $i = 0; $i < $l; $s .= $c[mt_rand(0, $cl)], ++$i); return $s; echo $s; } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iWjAF
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E > > RETURN                                                   1

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

End of function mt_rand_str

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.52 ms | 1395 KiB | 15 Q