3v4l.org

run code in 300+ PHP versions simultaneously
<?php $t = range(1, 32, 1); while (!empty($t) && count($g) < 4) { $key = array_rand($t); $g[] = $t[$key]; unset($t[$key]); } var_dump($g);
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 = 46) Position 1 = 18, Position 2 = 21
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 7
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 46) Position 1 = 18, Position 2 = 21
Branch analysis from position: 18
Branch analysis from position: 21
Branch analysis from position: 21
filename:       /in/97rS8
function name:  (null)
number of ops:  26
compiled vars:  !0 = $t, !1 = $key, !2 = $g
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
    4     6      > JMP                                                      ->15
    5     7    >   INIT_FCALL                                               'array_rand'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $5      
         10        ASSIGN                                                   !1, $5
    7    11        FETCH_DIM_R                                      ~8      !0, !1
         12        ASSIGN_DIM                                               !2
         13        OP_DATA                                                  ~8
    9    14        UNSET_DIM                                                !0, !1
    4    15    >   ISSET_ISEMPTY_CV                                 ~9      !0
         16        BOOL_NOT                                         ~10     ~9
         17      > JMPZ_EX                                          ~10     ~10, ->21
         18    >   COUNT                                            ~11     !2
         19        IS_SMALLER                                       ~12     ~11, 4
         20        BOOL                                             ~10     ~12
         21    > > JMPNZ                                                    ~10, ->7
   12    22    >   INIT_FCALL                                               'var_dump'
         23        SEND_VAR                                                 !2
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.87 ms | 1395 KiB | 19 Q