3v4l.org

run code in 300+ PHP versions simultaneously
<?php srand ( (double)microtime () * 10000000 ); $var = array ( 'Eins', 'Zwei', 'Drei', 'Vier' ); $rand_var = array_rand ( $var, 3 ); for ( $x = 0; $x < count ( $rand_var ); $x++ ) { echo $var[$rand_var[$x]] . "\n"; } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 15
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 15
Branch analysis from position: 23
Branch analysis from position: 15
filename:       /in/ono1C
function name:  (null)
number of ops:  24
compiled vars:  !0 = $var, !1 = $rand_var, !2 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'srand'
          1        INIT_FCALL                                               'microtime'
          2        DO_ICALL                                         $3      
          3        CAST                                          5  ~4      $3
          4        MUL                                              ~5      ~4, 10000000
          5        SEND_VAL                                                 ~5
          6        DO_ICALL                                                 
    4     7        ASSIGN                                                   !0, <array>
    6     8        INIT_FCALL                                               'array_rand'
          9        SEND_VAR                                                 !0
         10        SEND_VAL                                                 3
         11        DO_ICALL                                         $8      
         12        ASSIGN                                                   !1, $8
    8    13        ASSIGN                                                   !2, 0
         14      > JMP                                                      ->20
   10    15    >   FETCH_DIM_R                                      ~11     !1, !2
         16        FETCH_DIM_R                                      ~12     !0, ~11
         17        CONCAT                                           ~13     ~12, '%0A'
         18        ECHO                                                     ~13
    8    19        PRE_INC                                                  !2
         20    >   COUNT                                            ~15     !1
         21        IS_SMALLER                                               !2, ~15
         22      > JMPNZ                                                    ~16, ->15
   12    23    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.52 ms | 1395 KiB | 19 Q