3v4l.org

run code in 500+ PHP versions simultaneously
<?php // define your set $nums = range(0, 9); $alphas = range('a', 'z'); // shuffle sets shuffle($nums); shuffle($alphas); // pick out only what you need $nums = array_slice($nums, 0, 5); $alphas = array_slice($alphas, 0, 2); // merge them together $set = array_merge($nums, $alphas); // shuffle shuffle($set); // create your result echo implode($set);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CV7fS
function name:  (null)
number of ops:  39
compiled vars:  !0 = $nums, !1 = $alphas, !2 = $set
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'range'
          1        SEND_VAL                                                     0
          2        SEND_VAL                                                     9
          3        DO_ICALL                                             $3      
          4        ASSIGN                                                       !0, $3
    4     5        INIT_FCALL                                                   'range'
          6        SEND_VAL                                                     'a'
          7        SEND_VAL                                                     'z'
          8        DO_ICALL                                             $5      
          9        ASSIGN                                                       !1, $5
    7    10        INIT_FCALL                                                   'shuffle'
         11        SEND_REF                                                     !0
         12        DO_ICALL                                                     
    8    13        INIT_FCALL                                                   'shuffle'
         14        SEND_REF                                                     !1
         15        DO_ICALL                                                     
   11    16        INIT_FCALL                                                   'array_slice'
         17        SEND_VAR                                                     !0
         18        SEND_VAL                                                     0
         19        SEND_VAL                                                     5
         20        DO_ICALL                                             $9      
         21        ASSIGN                                                       !0, $9
   12    22        INIT_FCALL                                                   'array_slice'
         23        SEND_VAR                                                     !1
         24        SEND_VAL                                                     0
         25        SEND_VAL                                                     2
         26        DO_ICALL                                             $11     
         27        ASSIGN                                                       !1, $11
   15    28        INIT_FCALL                                                   'array_merge'
         29        SEND_VAR                                                     !0
         30        SEND_VAR                                                     !1
         31        DO_ICALL                                             $13     
         32        ASSIGN                                                       !2, $13
   18    33        INIT_FCALL                                                   'shuffle'
         34        SEND_REF                                                     !2
         35        DO_ICALL                                                     
   21    36        FRAMELESS_ICALL_1                implode             ~16     !2
         37        ECHO                                                         ~16
         38      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
181.08 ms | 2224 KiB | 17 Q