3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = [ ["name" => "Gus", "age" => 32], ["name" => "Jon", "age" => 44], ["name" => "Bob", "age" => 32], ["name" => "Jim", "age" => 103], ["name" => "Ted", "age" => 19], ["name" => "Ben", "age" => 32], ]; foreach ($array as &$row) { $row['order'] = &$ref[$row['age']]; } krsort($ref); $order = 0; foreach ($ref as &$v) { $v = ++$order; } var_export($array);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 2, Position 2 = 9
Branch analysis from position: 2
2 jumps found. (Code = 126) Position 1 = 3, Position 2 = 9
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 9
2 jumps found. (Code = 125) Position 1 = 15, Position 2 = 19
Branch analysis from position: 15
2 jumps found. (Code = 126) Position 1 = 16, Position 2 = 19
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
Branch analysis from position: 9
filename:       /in/ZRqfT
function name:  (null)
number of ops:  24
compiled vars:  !0 = $array, !1 = $row, !2 = $ref, !3 = $order, !4 = $v
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   12     1      > FE_RESET_RW                                          $6      !0, ->9
          2    > > FE_FETCH_RW                                                  $6, !1, ->9
   13     3    >   FETCH_DIM_R                                          ~8      !1, 'age'
          4        FETCH_DIM_W                                          $9      !2, ~8
          5        MAKE_REF                                             $10     $9
          6        FETCH_DIM_W                                          $7      !1, 'order'
          7        ASSIGN_REF                                                   $7, $10
   12     8      > JMP                                                          ->2
          9    >   FE_FREE                                                      $6
   15    10        INIT_FCALL                                                   'krsort'
         11        SEND_REF                                                     !2
         12        DO_ICALL                                                     
   16    13        ASSIGN                                                       !3, 0
   17    14      > FE_RESET_RW                                          $14     !2, ->19
         15    > > FE_FETCH_RW                                                  $14, !4, ->19
   18    16    >   PRE_INC                                              ~15     !3
         17        ASSIGN                                                       !4, ~15
   17    18      > JMP                                                          ->15
         19    >   FE_FREE                                                      $14
   20    20        INIT_FCALL                                                   'var_export'
         21        SEND_VAR                                                     !0
         22        DO_ICALL                                                     
         23      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
164.7 ms | 1972 KiB | 15 Q