3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array('b','a','r','n','e','y'); $keys =array_rand($a,count($a)); foreach ($keys as $k) { echo $a[$k]; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 12
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 12
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/Hbsf9
function name:  (null)
number of ops:  14
compiled vars:  !0 = $a, !1 = $keys, !2 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'array_rand'
          2        SEND_VAR                                                 !0
          3        COUNT                                            ~4      !0
          4        SEND_VAL                                                 ~4
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !1, $5
    5     7      > FE_RESET_R                                       $7      !1, ->12
          8    > > FE_FETCH_R                                               $7, !2, ->12
    6     9    >   FETCH_DIM_R                                      ~8      !0, !2
         10        ECHO                                                     ~8
    5    11      > JMP                                                      ->8
         12    >   FE_FREE                                                  $7
    7    13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.38 ms | 1394 KiB | 15 Q