3v4l.org

run code in 300+ PHP versions simultaneously
<?php $getvals = [ [ "value" => "150mm", "label" => "150mm", ], [ "value" => "150mm", "label" => "150mm", ], [ "value" => "150mm", "label" => "150mm", ], [ "value" => "150mm", "label" => "150mm", ], [ "value" => "125mm", "label" => "125mm", ], [ "value" => "125mm", "label" => "125mm", ], ]; $takens = array_values(array_column(array_map(function ($a) { return array_diff_key($a, ['label' => '']); }, $getvals), null, 'value')); var_dump($takens); // The output is below
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/D23iN
function name:  (null)
number of ops:  19
compiled vars:  !0 = $getvals, !1 = $takens
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   29     1        INIT_FCALL                                               'array_values'
          2        INIT_FCALL                                               'array_column'
          3        INIT_FCALL                                               'array_map'
          4        DECLARE_LAMBDA_FUNCTION                          ~3      [0]
   31     5        SEND_VAL                                                 ~3
          6        SEND_VAR                                                 !0
   29     7        DO_ICALL                                         $4      
   31     8        SEND_VAR                                                 $4
          9        SEND_VAL                                                 null
         10        SEND_VAL                                                 'value'
   29    11        DO_ICALL                                         $5      
   31    12        SEND_VAR                                                 $5
   29    13        DO_ICALL                                         $6      
         14        ASSIGN                                                   !1, $6
   33    15        INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                                 
         18      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/D23iN
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E >   RECV                                             !0      
   30     1        INIT_FCALL                                               'array_diff_key'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 <array>
          4        DO_ICALL                                         $1      
          5      > RETURN                                                   $1
   31     6*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.03 ms | 1015 KiB | 18 Q