3v4l.org

run code in 300+ PHP versions simultaneously
<?php $nums = array(1, 7, 8, 9); $key = array_rand($nums); echo $nums[$key] . PHP_EOL; shuffle($nums); echo $nums[0] . PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/S1EOM
function name:  (null)
number of ops:  15
compiled vars:  !0 = $nums, !1 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'array_rand'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !1, $3
    5     5        FETCH_DIM_R                                      ~5      !0, !1
          6        CONCAT                                           ~6      ~5, '%0A'
          7        ECHO                                                     ~6
    7     8        INIT_FCALL                                               'shuffle'
          9        SEND_REF                                                 !0
         10        DO_ICALL                                                 
    8    11        FETCH_DIM_R                                      ~8      !0, 0
         12        CONCAT                                           ~9      ~8, '%0A'
         13        ECHO                                                     ~9
    9    14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.18 ms | 1010 KiB | 15 Q