3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 2 => [ 66 => ['id' => 66, 'count' => 9], 255 => ['id' => 255, 'count' => 20], ], 1 => [ 59 => ['id' => 59, 'count' => 14], 255 => ['id' => 255, 'count' => 73], ] ]; array_walk( $array, fn(&$set) => uasort($set, fn($a, $b) => $b['count'] <=> $a['count']) ); var_export($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sm1j1
function name:  (null)
number of ops:  12
compiled vars:  !0 = $array, !1 = $b, !2 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   14     1        INIT_FCALL                                               'array_walk'
   15     2        SEND_REF                                                 !0
   16     3        DECLARE_LAMBDA_FUNCTION                          ~4      [0]
          4        BIND_LEXICAL                                             ~4, !1
          5        BIND_LEXICAL                                             ~4, !2
   17     6        SEND_VAL                                                 ~4
   14     7        DO_ICALL                                                 
   18     8        INIT_FCALL                                               'var_export'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                                 
         11      > 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/sm1j1
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $set, !1 = $b, !2 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
          2        BIND_STATIC                                              !2
          3        INIT_FCALL                                               'uasort'
          4        SEND_REF                                                 !0
          5        DECLARE_LAMBDA_FUNCTION                          ~3      [0]
          6        SEND_VAL                                                 ~3
          7        DO_ICALL                                         $4      
          8      > RETURN                                                   $4
   17     9*     > 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/sm1j1
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        FETCH_DIM_R                                      ~2      !1, 'count'
          3        FETCH_DIM_R                                      ~3      !0, 'count'
          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:
175.59 ms | 1013 KiB | 16 Q