3v4l.org

run code in 300+ PHP versions simultaneously
<?php $priceTableData = array( array('productId'=>1,'price'=>50,'discount'=>12), array('productId'=>2,'price'=>22,'discount'=>2), array('productId'=>3,'price'=>7,'discount'=>0), array('productId'=>4,'price'=>9,'discount'=>0), array('productId'=>5,'price'=>35,'discount'=>7), ); $discounts= array_column($priceTableData , 'discount', 'productId'); print_r($discounts);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VMsJq
function name:  (null)
number of ops:  11
compiled vars:  !0 = $priceTableData, !1 = $discounts
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   12     1        INIT_FCALL                                               'array_column'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 'discount'
          4        SEND_VAL                                                 'productId'
          5        DO_ICALL                                         $3      
          6        ASSIGN                                                   !1, $3
   14     7        INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.69 ms | 1394 KiB | 17 Q