3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr =array( "20" => Array ( "ean" => "**6900532615069**", "productPrice" => 1140, "productCount" => 50 ), "15" => Array ( "ean" => "**6900532615069**", "productPrice" => 1140, "productCount" => 5 ), "25" => Array ( "ean" => 6900535364122, "productPrice" => 1140, "productCount" => 50 ), "36" => Array ( "ean" => "**6900532615069**", "productPrice" => 1140, "productCount" => 10, )); usort($arr, function ($a, $b) { return $b['productCount'] - $a['productCount']; }); $arr = array_values(array_column($arr, NULL, "ean")); var_dump($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WZKLB
function name:  (null)
number of ops:  19
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   30     1        INIT_FCALL                                               'usort'
          2        SEND_REF                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                          ~2      [0]
   32     4        SEND_VAL                                                 ~2
   30     5        DO_ICALL                                                 
   35     6        INIT_FCALL                                               'array_values'
          7        INIT_FCALL                                               'array_column'
          8        SEND_VAR                                                 !0
          9        SEND_VAL                                                 null
         10        SEND_VAL                                                 'ean'
         11        DO_ICALL                                         $4      
         12        SEND_VAR                                                 $4
         13        DO_ICALL                                         $5      
         14        ASSIGN                                                   !0, $5
   36    15        INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !0
         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/WZKLB
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   30     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   31     2        FETCH_DIM_R                                      ~2      !1, 'productCount'
          3        FETCH_DIM_R                                      ~3      !0, 'productCount'
          4        SUB                                              ~4      ~2, ~3
          5      > RETURN                                                   ~4
   32     6*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.24 ms | 1429 KiB | 17 Q