3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ ['customerName' => "John Dunk", 'customerPhone' => '5555555555', 'Difference' => 125.0], ['customerName' => "John Dunk", 'customerPhone' => '5555555555', 'Difference' => 192.0], ['customerName' => "John X", 'customerPhone' => '5555555555', 'Difference' => 225.0], ['customerName' => "John X", 'customerPhone' => '5555555555', 'Difference' => 1.0]]; array_multisort(array_column($array, 'Difference'), SORT_DESC, $array); $result = array_column($array, null, 'customerName'); print_r($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MnlPA
function name:  (null)
number of ops:  20
compiled vars:  !0 = $array, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   18     1        INIT_FCALL                                               'array_multisort'
          2        INIT_FCALL                                               'array_column'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 'Difference'
          5        DO_ICALL                                         $3      
          6        SEND_VAL                                                 $3
          7        SEND_VAL                                                 3
          8        SEND_REF                                                 !0
          9        DO_ICALL                                                 
   20    10        INIT_FCALL                                               'array_column'
         11        SEND_VAR                                                 !0
         12        SEND_VAL                                                 null
         13        SEND_VAL                                                 'customerName'
         14        DO_ICALL                                         $5      
         15        ASSIGN                                                   !1, $5
   22    16        INIT_FCALL                                               'print_r'
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.13 ms | 1395 KiB | 19 Q