3v4l.org

run code in 300+ PHP versions simultaneously
<?php $objects = [ (object)['Leasing' => 12939.74, 'Name' => 'Jeremy', 'Rental' => 0, 'Sales' => 56603.13, 'Total' => 69542.87], (object)['Leasing' => 0, 'Name' => 'Shaun', 'Rental' => 0, 'Sales' => 58590, 'Total' => 58590], (object)['Leasing' => 0, 'Name' => 'Lindsay', 'Rental' => 0, 'Sales' => 22951.97, 'Total' => 22951.97], (object)['Leasing' => 0, 'Name' => 'Sally', 'Rental' => 1200, 'Sales' => 21624.9, 'Total' => 22824.9], (object)['Leasing' => 0, 'Name' => 'House', 'Rental' => 0, 'Sales' => 16235.81, 'Total' => 16235.81], (object)['Leasing' => 5298.85, 'Name' => 'Bill', 'Rental' => 1200, 'Sales' => 0, 'Total' => 6498.85] ]; array_multisort( array_map(fn($obj) => $obj->Name !== 'House', $objects), array_column($objects, 'Total'), SORT_DESC, $objects ); var_export($objects);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/an3SS
function name:  (null)
number of ops:  32
compiled vars:  !0 = $objects
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   CAST                                          8  ~1      <array>
          1        INIT_ARRAY                                       ~2      ~1
    5     2        CAST                                          8  ~3      <array>
          3        ADD_ARRAY_ELEMENT                                ~2      ~3
    6     4        CAST                                          8  ~4      <array>
          5        ADD_ARRAY_ELEMENT                                ~2      ~4
    7     6        CAST                                          8  ~5      <array>
          7        ADD_ARRAY_ELEMENT                                ~2      ~5
    8     8        CAST                                          8  ~6      <array>
          9        ADD_ARRAY_ELEMENT                                ~2      ~6
    9    10        CAST                                          8  ~7      <array>
         11        ADD_ARRAY_ELEMENT                                ~2      ~7
    3    12        ASSIGN                                                   !0, ~2
   12    13        INIT_FCALL                                               'array_multisort'
   13    14        INIT_FCALL                                               'array_map'
         15        DECLARE_LAMBDA_FUNCTION                          ~9      [0]
         16        SEND_VAL                                                 ~9
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                         $10     
         19        SEND_VAL                                                 $10
   14    20        INIT_FCALL                                               'array_column'
         21        SEND_VAR                                                 !0
         22        SEND_VAL                                                 'Total'
         23        DO_ICALL                                         $11     
         24        SEND_VAL                                                 $11
   15    25        SEND_VAL                                                 3
   16    26        SEND_REF                                                 !0
   12    27        DO_ICALL                                                 
   18    28        INIT_FCALL                                               'var_export'
         29        SEND_VAR                                                 !0
         30        DO_ICALL                                                 
         31      > 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/an3SS
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
          1        FETCH_OBJ_R                                      ~1      !0, 'Name'
          2        IS_NOT_IDENTICAL                                 ~2      ~1, 'House'
          3      > RETURN                                                   ~2
          4*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.63 ms | 1009 KiB | 17 Q