3v4l.org

run code in 300+ PHP versions simultaneously
<?php $menu = [ (object)[ 'tid' => 24, 'name' => 'Sample', 'weight' => 3, 'depth' => 0 ], (object)[ 'tid' => 66, 'name' => 'Sample Subcategory', 'weight' => 0, 'depth' => 1 ], (object)[ 'tid' => 67, 'name' => 'Another Example', 'weight' => 1, 'depth' => 0 ], (object)[ 'tid' => 68, 'name' => 'Subcategory for Another Example', 'weight' => 1, 'depth' => 1 ], (object)[ 'tid' => 22, 'name' => 'A third example master category', 'weight' => 0, 'depth' => 0 ] ]; array_multisort(array_column($menu, 'depth'), array_column($menu, 'weight'), $menu); var_export($menu);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/I0tCg
function name:  (null)
number of ops:  28
compiled vars:  !0 = $menu
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   CAST                                          8  ~1      <array>
          1        INIT_ARRAY                                       ~2      ~1
   11     2        CAST                                          8  ~3      <array>
          3        ADD_ARRAY_ELEMENT                                ~2      ~3
   17     4        CAST                                          8  ~4      <array>
          5        ADD_ARRAY_ELEMENT                                ~2      ~4
   23     6        CAST                                          8  ~5      <array>
          7        ADD_ARRAY_ELEMENT                                ~2      ~5
   29     8        CAST                                          8  ~6      <array>
          9        ADD_ARRAY_ELEMENT                                ~2      ~6
    3    10        ASSIGN                                                   !0, ~2
   36    11        INIT_FCALL                                               'array_multisort'
         12        INIT_FCALL                                               'array_column'
         13        SEND_VAR                                                 !0
         14        SEND_VAL                                                 'depth'
         15        DO_ICALL                                         $8      
         16        SEND_VAL                                                 $8
         17        INIT_FCALL                                               'array_column'
         18        SEND_VAR                                                 !0
         19        SEND_VAL                                                 'weight'
         20        DO_ICALL                                         $9      
         21        SEND_VAL                                                 $9
         22        SEND_REF                                                 !0
         23        DO_ICALL                                                 
   38    24        INIT_FCALL                                               'var_export'
         25        SEND_VAR                                                 !0
         26        DO_ICALL                                                 
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.32 ms | 1015 KiB | 16 Q