3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array ( 0 => (object)array ( 'id' => 1, 'name' => 'MainCategory1', 'updated' => '2020-01-1414:13:30', 'priority' => 1 ), 1 => (object)array ( 'id' => 2, 'name' => 'MainCategory2', 'updated' => '2020-01-1417:19:35', 'priority' => 2 ), 2 => (object)array ( 'id' => 3, 'name' => 'Category3', 'updated' => '2020-01-1417:42:23', 'priority' => 3 ) ); usort($array, function ($a, $b) { return $b->priority - $a->priority; }); print_r(array($array[0]));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YHbVB
function name:  (null)
number of ops:  18
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   CAST                                          8  ~1      <array>
          1        INIT_ARRAY                                       ~2      ~1, 0
   13     2        CAST                                          8  ~3      <array>
          3        ADD_ARRAY_ELEMENT                                ~2      ~3, 1
   20     4        CAST                                          8  ~4      <array>
          5        ADD_ARRAY_ELEMENT                                ~2      ~4, 2
    3     6        ASSIGN                                                   !0, ~2
   27     7        INIT_FCALL                                               'usort'
          8        SEND_REF                                                 !0
          9        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FYHbVB%3A27%240'
         10        SEND_VAL                                                 ~6
         11        DO_ICALL                                                 
   28    12        INIT_FCALL                                               'print_r'
         13        FETCH_DIM_R                                      ~8      !0, 0
         14        INIT_ARRAY                                       ~9      ~8
         15        SEND_VAL                                                 ~9
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FYHbVB%3A27%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YHbVB
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        FETCH_OBJ_R                                      ~2      !1, 'priority'
          3        FETCH_OBJ_R                                      ~3      !0, 'priority'
          4        SUB                                              ~4      ~2, ~3
          5      > RETURN                                                   ~4
          6*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FYHbVB%3A27%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.6 ms | 1395 KiB | 17 Q