3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = Array ( "chann_1" => 155.755, "chann_2" => 154.61, "chann_3" => 156.719, "chann_4" => 156.727, "chann_5" => 155.797, "chann_6" => 157.615, "chann_7" => 154.257, "chann_8" => 151.724, "chann_9" => 156.549, "chann_10" => 156.594, "chann_11" => 157.56, "chann_12" => 156.405 ); Arsort($arr); $keys = array_keys($arr); Echo $keys[round(count($keys)/2)];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qXNrkQ
function name:  (null)
number of ops:  16
compiled vars:  !0 = $arr, !1 = $keys
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   19     1        INIT_FCALL                                               'arsort'
          2        SEND_REF                                                 !0
          3        DO_ICALL                                                 
   20     4        INIT_FCALL                                               'array_keys'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $4      
          7        ASSIGN                                                   !1, $4
   21     8        INIT_FCALL                                               'round'
          9        COUNT                                            ~6      !1
         10        DIV                                              ~7      ~6, 2
         11        SEND_VAL                                                 ~7
         12        DO_ICALL                                         $8      
         13        FETCH_DIM_R                                      ~9      !1, $8
         14        ECHO                                                     ~9
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.67 ms | 1394 KiB | 19 Q