3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ ['ID' => 1, 'title' => 'Boring Meeting', 'date_start' => '2010-07-30', 'event_type' => 'meeting', 'state' => 'new-york'], ['ID' => 2, 'title' => 'Find My Stapler', 'date_start' => '2010-07-22', 'event_type' => 'meeting', 'state' => 'new-york'], ['ID' => 3, 'title' => 'Mario Party', 'date_start' => '2010-07-22', 'event_type' => 'party', 'state' => 'new-york'], ['ID' => 4, 'title' => 'Duct Tape Party', 'date_start' => '2010-07-28', 'event_type' => 'party', 'state' => 'california'] ]; usort($array, fn($a, $b) => [$a['state'], $a['event_type'], $a['date_start']] <=> [$b['state'], $b['event_type'], $b['date_start']]); var_export($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3RbFO
function name:  (null)
number of ops:  10
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    9     1        INIT_FCALL                                               'usort'
          2        SEND_REF                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                          ~2      [0]
          4        SEND_VAL                                                 ~2
          5        DO_ICALL                                                 
   11     6        INIT_FCALL                                               'var_export'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
          9      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3RbFO
function name:  {closure}
number of ops:  17
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_DIM_R                                      ~2      !0, 'state'
          3        INIT_ARRAY                                       ~3      ~2
          4        FETCH_DIM_R                                      ~4      !0, 'event_type'
          5        ADD_ARRAY_ELEMENT                                ~3      ~4
          6        FETCH_DIM_R                                      ~5      !0, 'date_start'
          7        ADD_ARRAY_ELEMENT                                ~3      ~5
          8        FETCH_DIM_R                                      ~6      !1, 'state'
          9        INIT_ARRAY                                       ~7      ~6
         10        FETCH_DIM_R                                      ~8      !1, 'event_type'
         11        ADD_ARRAY_ELEMENT                                ~7      ~8
         12        FETCH_DIM_R                                      ~9      !1, 'date_start'
         13        ADD_ARRAY_ELEMENT                                ~7      ~9
         14        SPACESHIP                                        ~10     ~3, ~7
         15      > RETURN                                                   ~10
         16*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.06 ms | 1438 KiB | 15 Q