3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [ ['value' => '150mm', 'label' => '150mm'], ['value' => '150mm', 'label' => '150mm'], ['value' => '150mm', 'label' => '150mm'], ['value' => '125mm', 'label' => '125mm'], ['value' => '125mm', 'label' => '125mm'] ]; $r = array_values(array_column($a, null, 'label')); print_r($r); /******** if you want to keep single column ******/ $r = array_values(array_column($a, 'value', 'label')); print_r($r);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n8SA1
function name:  (null)
number of ops:  26
compiled vars:  !0 = $a, !1 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   10     1        INIT_FCALL                                               'array_values'
          2        INIT_FCALL                                               'array_column'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 null
          5        SEND_VAL                                                 'label'
          6        DO_ICALL                                         $3      
          7        SEND_VAR                                                 $3
          8        DO_ICALL                                         $4      
          9        ASSIGN                                                   !1, $4
   11    10        INIT_FCALL                                               'print_r'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                                 
   13    13        INIT_FCALL                                               'array_values'
         14        INIT_FCALL                                               'array_column'
         15        SEND_VAR                                                 !0
         16        SEND_VAL                                                 'value'
         17        SEND_VAL                                                 'label'
         18        DO_ICALL                                         $7      
         19        SEND_VAR                                                 $7
         20        DO_ICALL                                         $8      
         21        ASSIGN                                                   !1, $8
   14    22        INIT_FCALL                                               'print_r'
         23        SEND_VAR                                                 !1
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.4 ms | 1012 KiB | 16 Q