3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ [ 'countries' => [ ['country_code' => 'US', 'growth' => 3.57], ['country_code' => 'CA', 'growth' => 4.77], ['country_code' => 'TT', 'growth' => 0], ], 'group_name' => 'North America', ], [ 'countries' => [ ['country_code' => 'BR', 'growth' => 2.19], ['country_code' => 'PE', 'growth' => 1.78], ['country_code' => 'UY', 'growth' => 8.83], ['country_code' => 'MX', 'growth' => 3.83], ], 'group_name' => 'South America', ], ]; var_export( array_map( function ($set) { usort($set['countries'], fn($a, $b) => $b['growth'] <=> $a['growth']); return $set; }, $array ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sPVfc
function name:  (null)
number of ops:  10
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   23     1        INIT_FCALL                                               'var_export'
   24     2        INIT_FCALL                                               'array_map'
   25     3        DECLARE_LAMBDA_FUNCTION                          ~2      [0]
   28     4        SEND_VAL                                                 ~2
   29     5        SEND_VAR                                                 !0
   24     6        DO_ICALL                                         $3      
   29     7        SEND_VAR                                                 $3
   23     8        DO_ICALL                                                 
   31     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/sPVfc
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $set
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   RECV                                             !0      
   26     1        INIT_FCALL                                               'usort'
          2        FETCH_DIM_W                                      $1      !0, 'countries'
          3        SEND_REF                                                 $1
          4        DECLARE_LAMBDA_FUNCTION                          ~2      [0]
          5        SEND_VAL                                                 ~2
          6        DO_ICALL                                                 
   27     7      > RETURN                                                   !0
   28     8*     > RETURN                                                   null


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sPVfc
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        FETCH_DIM_R                                      ~2      !1, 'growth'
          3        FETCH_DIM_R                                      ~3      !0, 'growth'
          4        SPACESHIP                                        ~4      ~2, ~3
          5      > RETURN                                                   ~4
          6*     > RETURN                                                   null

End of Dynamic Function 0

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.31 ms | 1013 KiB | 16 Q