3v4l.org

run code in 300+ 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
    5     2        CAST                                          8  ~3      <array>
          3        ADD_ARRAY_ELEMENT                                ~2      ~3
    6     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                                  '%00%7Bclosure%7D%2Fin%2FsCfsH%3A9%240'
         10        SEND_VAL                                                 ~6
         11        DO_ICALL                                                 
   10    12        INIT_FCALL                                               'var_export'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FsCfsH%3A9%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sCfsH
function name:  {closure}
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 function %00%7Bclosure%7D%2Fin%2FsCfsH%3A9%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.59 ms | 1395 KiB | 17 Q