3v4l.org

run code in 300+ PHP versions simultaneously
<?php function id($n=6) { $c = 'abcdefghijklmnopqrstuvwxyz0123456789'; for ($x=0,$r=null;$x<$n;$x++) { $r .= $c[mt_rand(0, strlen($c) - 1)]; } return $r; } echo id(11);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Mbmib
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'id'
          1        SEND_VAL                                                 11
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

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

End of function id

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.96 ms | 1398 KiB | 16 Q