3v4l.org

run code in 300+ PHP versions simultaneously
<?php $aryNo = array( 0 => 34, 1 => 34, 2 => 51, 3 => 12, 4 => 12, 5 => 12, 6 => 56, 7 => 876, 8 => 453, 9 => 43, 10 => 12 ); $b = array_keys($aryNo, min($aryNo)); //Here only can get 1 value. // Taking a random KEY from $b $key = array_rand($b); // Taking a KEY from $aryNo which is under `$key` echo $b[$key]; // Taking a VALUE from `$aryNo` which is under `$b[$key]` echo $aryNo[$b[$key]];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qljOY
function name:  (null)
number of ops:  19
compiled vars:  !0 = $aryNo, !1 = $b, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    8     1        INIT_FCALL                                               'array_keys'
          2        SEND_VAR                                                 !0
          3        INIT_FCALL                                               'min'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $4      
          6        SEND_VAR                                                 $4
          7        DO_ICALL                                         $5      
          8        ASSIGN                                                   !1, $5
   11     9        INIT_FCALL                                               'array_rand'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $7      
         12        ASSIGN                                                   !2, $7
   14    13        FETCH_DIM_R                                      ~9      !1, !2
         14        ECHO                                                     ~9
   17    15        FETCH_DIM_R                                      ~10     !1, !2
         16        FETCH_DIM_R                                      ~11     !0, ~10
         17        ECHO                                                     ~11
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.7 ms | 1011 KiB | 16 Q