3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = [ (object) ['ID' => 1, 'name' => 'Mary Jane', 'count' => '420'], (object) ['ID' => 2, 'name' => 'Johnny', 'count' => '23420'], (object) ['ID' => 3, 'name' => 'Kathy', 'count' => '4354'], ]; usort($array, fn($a,$b) => $a->count <=> $b->count); var_export($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sCfsH
function name:  (null)
number of ops:  16
compiled vars:  !0 = $array
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   CAST                                              8  ~1      <array>
          1        INIT_ARRAY                                           ~2      ~1
          2        CAST                                              8  ~3      <array>
          3        ADD_ARRAY_ELEMENT                                    ~2      ~3
          4        CAST                                              8  ~4      <array>
          5        ADD_ARRAY_ELEMENT                                    ~2      ~4
    3     6        ASSIGN                                                       !0, ~2
    9     7        INIT_FCALL                                                   'usort'
          8        SEND_REF                                                     !0
          9        DECLARE_LAMBDA_FUNCTION                              ~6      [0]
         10        SEND_VAL                                                     ~6
         11        DO_ICALL                                                     
   10    12        INIT_FCALL                                                   'var_export'
         13        SEND_VAR                                                     !0
         14        DO_ICALL                                                     
         15      > 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/sCfsH
function name:  {closure:/in/sCfsH:9}
number of ops:  7
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    9     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
          2        FETCH_OBJ_R                                          ~2      !0, 'count'
          3        FETCH_OBJ_R                                          ~3      !1, 'count'
          4        SPACESHIP                                            ~4      ~2, ~3
          5      > RETURN                                                       ~4
          6*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
180.08 ms | 1919 KiB | 15 Q