3v4l.org

run code in 300+ PHP versions simultaneously
<?php $teamLists = range(1, 32, 1); $group = []; while (!empty($teamLists) && count($group) < 4) { $key = array_rand($teamLists); $group[] = $teamLists[$key]; unset($teamLists[$key]); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 46) Position 1 = 19, Position 2 = 22
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 8
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 46) Position 1 = 19, Position 2 = 22
Branch analysis from position: 19
Branch analysis from position: 22
Branch analysis from position: 22
filename:       /in/TpsUa
function name:  (null)
number of ops:  24
compiled vars:  !0 = $teamLists, !1 = $group, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 1
          2        SEND_VAL                                                 32
          3        SEND_VAL                                                 1
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !0, $3
    3     6        ASSIGN                                                   !1, <array>
    4     7      > JMP                                                      ->16
    5     8    >   INIT_FCALL                                               'array_rand'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $6      
         11        ASSIGN                                                   !2, $6
    6    12        FETCH_DIM_R                                      ~9      !0, !2
         13        ASSIGN_DIM                                               !1
         14        OP_DATA                                                  ~9
    7    15        UNSET_DIM                                                !0, !2
    4    16    >   ISSET_ISEMPTY_CV                                 ~10     !0
         17        BOOL_NOT                                         ~11     ~10
         18      > JMPZ_EX                                          ~11     ~11, ->22
         19    >   COUNT                                            ~12     !1
         20        IS_SMALLER                                       ~13     ~12, 4
         21        BOOL                                             ~11     ~13
         22    > > JMPNZ                                                    ~11, ->8
    8    23    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.07 ms | 1395 KiB | 17 Q