3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [1, 2, 3, 4, 5, 6, 7, 8, 9]; $result = []; for ($i = 0; $i < 8; ++$i) { $result[] = $array[array_rand($array)]; } var_export($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 4
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 4
Branch analysis from position: 13
Branch analysis from position: 4
filename:       /in/tsMta
function name:  (null)
number of ops:  17
compiled vars:  !0 = $array, !1 = $result, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, <array>
    6     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->11
    7     4    >   INIT_FCALL                                               'array_rand'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $7      
          7        FETCH_DIM_R                                      ~8      !0, $7
          8        ASSIGN_DIM                                               !1
          9        OP_DATA                                                  ~8
    6    10        PRE_INC                                                  !2
         11    >   IS_SMALLER                                               !2, 8
         12      > JMPNZ                                                    ~10, ->4
    9    13    >   INIT_FCALL                                               'var_export'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.07 ms | 1005 KiB | 15 Q