3v4l.org

run code in 300+ PHP versions simultaneously
<?php $chars = "a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z"; $chars2 = "0,1,2,3,4,5,6,7,8,9"; $chars = str_replace("," , "" , $chars); $chars2 = str_replace("," , "" , $chars2); $result = []; for($i = 0 ; $i < 6 ; $i++) { $result[] = $i < 3 ? substr($chars , rand(0 , strlen($chars) - 1) , 1) : substr($chars2 , rand(0 , strlen($chars2) - 1) , 1); } shuffle($result); var_dump($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 47
Branch analysis from position: 47
2 jumps found. (Code = 44) Position 1 = 49, Position 2 = 17
Branch analysis from position: 49
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 32
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 44
Branch analysis from position: 44
2 jumps found. (Code = 44) Position 1 = 49, Position 2 = 17
Branch analysis from position: 49
Branch analysis from position: 17
Branch analysis from position: 32
2 jumps found. (Code = 44) Position 1 = 49, Position 2 = 17
Branch analysis from position: 49
Branch analysis from position: 17
filename:       /in/snPMS
function name:  (null)
number of ops:  56
compiled vars:  !0 = $chars, !1 = $chars2, !2 = $result, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'a%2Cb%2Cc%2Cd%2Ce%2Cf%2Cg%2Ch%2Ci%2Cj%2Ck%2Cl%2Cm%2Cn%2Co%2Cp%2Cq%2Cr%2Cs%2Ct%2Cu%2Cv%2Cw%2Cx%2Cy%2Cz'
    4     1        ASSIGN                                                   !1, '0%2C1%2C2%2C3%2C4%2C5%2C6%2C7%2C8%2C9'
    6     2        INIT_FCALL                                               'str_replace'
          3        SEND_VAL                                                 '%2C'
          4        SEND_VAL                                                 ''
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $6      
          7        ASSIGN                                                   !0, $6
    7     8        INIT_FCALL                                               'str_replace'
          9        SEND_VAL                                                 '%2C'
         10        SEND_VAL                                                 ''
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $8      
         13        ASSIGN                                                   !1, $8
    9    14        ASSIGN                                                   !2, <array>
   10    15        ASSIGN                                                   !3, 0
         16      > JMP                                                      ->47
   12    17    >   IS_SMALLER                                               !3, 3
         18      > JMPZ                                                     ~13, ->32
   13    19    >   INIT_FCALL                                               'substr'
         20        SEND_VAR                                                 !0
         21        INIT_FCALL                                               'rand'
         22        SEND_VAL                                                 0
         23        STRLEN                                           ~14     !0
         24        SUB                                              ~15     ~14, 1
         25        SEND_VAL                                                 ~15
         26        DO_ICALL                                         $16     
         27        SEND_VAR                                                 $16
         28        SEND_VAL                                                 1
         29        DO_ICALL                                         $17     
         30        QM_ASSIGN                                        ~18     $17
         31      > JMP                                                      ->44
   14    32    >   INIT_FCALL                                               'substr'
         33        SEND_VAR                                                 !1
         34        INIT_FCALL                                               'rand'
         35        SEND_VAL                                                 0
         36        STRLEN                                           ~19     !1
         37        SUB                                              ~20     ~19, 1
         38        SEND_VAL                                                 ~20
         39        DO_ICALL                                         $21     
         40        SEND_VAR                                                 $21
         41        SEND_VAL                                                 1
         42        DO_ICALL                                         $22     
         43        QM_ASSIGN                                        ~18     $22
   12    44    >   ASSIGN_DIM                                               !2
   14    45        OP_DATA                                                  ~18
   10    46        PRE_INC                                                  !3
         47    >   IS_SMALLER                                               !3, 6
         48      > JMPNZ                                                    ~24, ->17
   17    49    >   INIT_FCALL                                               'shuffle'
         50        SEND_REF                                                 !2
         51        DO_ICALL                                                 
   19    52        INIT_FCALL                                               'var_dump'
         53        SEND_VAR                                                 !2
         54        DO_ICALL                                                 
         55      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.31 ms | 945 KiB | 24 Q