3v4l.org

run code in 500+ PHP versions simultaneously
<?php $sort = array( 'A' => 3, 'B' => 2, 'C' => 1, ); $menu['A'] = array( 'access' => array(1), ); $menu['B'] = array( 'access' => array((object) array('a', 'b')), ); $menu['C'] = array( 'access' => array(0), ); array_multisort($sort, SORT_NUMERIC, $menu, SORT_REGULAR); print_r($menu);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iFDlV
function name:  (null)
number of ops:  20
compiled vars:  !0 = $sort, !1 = $menu
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    8     1        ASSIGN_DIM                                                   !1, 'A'
    9     2        OP_DATA                                                      <array>
   12     3        CAST                                              8  ~5      <array>
          4        INIT_ARRAY                                           ~6      ~5
          5        INIT_ARRAY                                           ~7      ~6, 'access'
   11     6        ASSIGN_DIM                                                   !1, 'B'
   12     7        OP_DATA                                                      ~7
   14     8        ASSIGN_DIM                                                   !1, 'C'
   15     9        OP_DATA                                                      <array>
   18    10        INIT_FCALL                                                   'array_multisort'
         11        SEND_REF                                                     !0
         12        SEND_VAL                                                     1
         13        SEND_REF                                                     !1
         14        SEND_VAL                                                     0
         15        DO_ICALL                                                     
   19    16        INIT_FCALL                                                   'print_r'
         17        SEND_VAR                                                     !1
         18        DO_ICALL                                                     
         19      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
252.61 ms | 3596 KiB | 15 Q