3v4l.org

run code in 300+ PHP versions simultaneously
<?php $MainArray = array('PHILIPPINES' => array( 'SUPERIOR KING ROOM' => array( '2021-12-05' => array('total' => 1, 'revenue' => 600.00), '2021-12-06' => array('total' => 4, 'revenue' => 534.00), ), '3D KING ROOM' => array( '2021-12-05' => array('total' => 3, 'revenue' => 320.00), '2021-12-06' => array('total' => 1, 'revenue' => 0.00) ), ), 'AUSTRALIA' => array( 'PRESIDENTIAL SUITE' => array('2021-12-05' => array('total' => 4, 'revenue' => 888.00)), 'DELUXE ROOM' => array('2021-12-06' => array('total' => 1, 'revenue' => 0.00)), ), ); /* sort by country name */ foreach ($MainArray as $key => $country){ $ord[] = $key; } array_multisort($ord, SORT_ASC, $MainArray); print_r($MainArray );
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 7
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/RfMsE
function name:  (null)
number of ops:  17
compiled vars:  !0 = $MainArray, !1 = $country, !2 = $key, !3 = $ord
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   22     1      > FE_RESET_R                                       $5      !0, ->7
          2    > > FE_FETCH_R                                       ~6      $5, !1, ->7
          3    >   ASSIGN                                                   !2, ~6
   23     4        ASSIGN_DIM                                               !3
          5        OP_DATA                                                  !2
   22     6      > JMP                                                      ->2
          7    >   FE_FREE                                                  $5
   25     8        INIT_FCALL                                               'array_multisort'
          9        SEND_REF                                                 !3
         10        SEND_VAL                                                 4
         11        SEND_REF                                                 !0
         12        DO_ICALL                                                 
   26    13        INIT_FCALL                                               'print_r'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.05 ms | 1002 KiB | 15 Q