3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ "2007" => [ "number-xx" => "5", "number-aa" => "30", "number-ef" => "2", "number-sa" => "-10", "number-ab" => "28", ], "2008" => [ "number-xx" => "-1", "number-aa" => "0.5", "number-ef" => "23", "number-sa" => "55", "number-ab" => "43", ] ]; function buildQuilt($data) { return array_reverse(array_map(function ($v) { natsort($v); return $v; }, $data), true); } print_r(buildQuilt($array));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YX3Ju
function name:  (null)
number of ops:  8
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   28     1        INIT_FCALL                                               'print_r'
          2        INIT_FCALL                                               'buildquilt'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0  $2      
          5        SEND_VAR                                                 $2
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function buildquilt:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YX3Ju
function name:  buildQuilt
number of ops:  12
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   RECV                                             !0      
   22     1        INIT_FCALL                                               'array_reverse'
          2        INIT_FCALL                                               'array_map'
          3        DECLARE_LAMBDA_FUNCTION                          ~1      [0]
   25     4        SEND_VAL                                                 ~1
          5        SEND_VAR                                                 !0
   22     6        DO_ICALL                                         $2      
   25     7        SEND_VAR                                                 $2
          8        SEND_VAL                                                 <true>
   22     9        DO_ICALL                                         $3      
   25    10      > RETURN                                                   $3
   26    11*     > 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/YX3Ju
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   RECV                                             !0      
   23     1        INIT_FCALL                                               'natsort'
          2        SEND_REF                                                 !0
          3        DO_ICALL                                                 
   24     4      > RETURN                                                   !0
   25     5*     > RETURN                                                   null

End of Dynamic Function 0

End of function buildquilt

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.86 ms | 1008 KiB | 18 Q