3v4l.org

run code in 300+ PHP versions simultaneously
<?php $where = [ 'Péché mignon', 'McDo', 'Flunch' ]; srand(time()); $value = rand(0, count($where) - 1); echo $where[$value];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NHeSq
function name:  (null)
number of ops:  16
compiled vars:  !0 = $where, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'srand'
          2        INIT_FCALL                                               'time'
          3        DO_ICALL                                         $3      
          4        SEND_VAR                                                 $3
          5        DO_ICALL                                                 
    6     6        INIT_FCALL                                               'rand'
          7        SEND_VAL                                                 0
          8        COUNT                                            ~5      !0
          9        SUB                                              ~6      ~5, 1
         10        SEND_VAL                                                 ~6
         11        DO_ICALL                                         $7      
         12        ASSIGN                                                   !1, $7
    8    13        FETCH_DIM_R                                      ~9      !0, !1
         14        ECHO                                                     ~9
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.09 ms | 1394 KiB | 19 Q