3v4l.org

run code in 300+ PHP versions simultaneously
<?php $zm = [ 6000 => [ 0 => [ 'wskaznik' => 100 ], 1 => [ 'wskaznik' => 100 ] ], 8000 => [ 0 => [ 'wskaznik' => 50 ], 1 => [ 'wskaznik' => 50 ] ], 4000 => [ 0 => [ 'wskaznik' => 200 ], 1 => [ 'wskaznik' => 200 ] ], ]; $counts = array(); $keys = array_keys($zm); foreach ($zm as $key => $value){ $counts[] = $value[0]['wskaznik']; } $counts_copy = $counts; array_multisort($counts, $zm); array_multisort($counts_copy, $keys); $out = array_combine($keys, $zm); echo "<pre>"; print_r($out); echo "</pre>"; exit;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 14
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 14
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 14
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 14
filename:       /in/5tr8J
function name:  (null)
number of ops:  36
compiled vars:  !0 = $zm, !1 = $counts, !2 = $keys, !3 = $value, !4 = $key, !5 = $counts_copy, !6 = $out
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   30     1        ASSIGN                                                   !1, <array>
   31     2        INIT_FCALL                                               'array_keys'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $9      
          5        ASSIGN                                                   !2, $9
   32     6      > FE_RESET_R                                       $11     !0, ->14
          7    > > FE_FETCH_R                                       ~12     $11, !3, ->14
          8    >   ASSIGN                                                   !4, ~12
   33     9        FETCH_DIM_R                                      ~15     !3, 0
         10        FETCH_DIM_R                                      ~16     ~15, 'wskaznik'
         11        ASSIGN_DIM                                               !1
         12        OP_DATA                                                  ~16
   32    13      > JMP                                                      ->7
         14    >   FE_FREE                                                  $11
   35    15        ASSIGN                                                   !5, !1
   36    16        INIT_FCALL                                               'array_multisort'
         17        SEND_REF                                                 !1
         18        SEND_REF                                                 !0
         19        DO_ICALL                                                 
   37    20        INIT_FCALL                                               'array_multisort'
         21        SEND_REF                                                 !5
         22        SEND_REF                                                 !2
         23        DO_ICALL                                                 
   38    24        INIT_FCALL                                               'array_combine'
         25        SEND_VAR                                                 !2
         26        SEND_VAR                                                 !0
         27        DO_ICALL                                         $20     
         28        ASSIGN                                                   !6, $20
   43    29        ECHO                                                     '%3Cpre%3E'
   44    30        INIT_FCALL                                               'print_r'
         31        SEND_VAR                                                 !6
         32        DO_ICALL                                                 
   45    33        ECHO                                                     '%3C%2Fpre%3E'
   46    34      > EXIT                                                     
   47    35*     > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.5 ms | 1004 KiB | 17 Q