3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( array("5","3","21"), array("0.5","3","may"), array("2.2","3","sport"), ); //print_r($array); function subval_sort($a,$subkey) { foreach($a as $k=>$v) { $b[$k] = strtolower($v[$subkey]); } asort($b); foreach($b as $key=>$val) { $c[] = $a[$key]; } return $c; } $result = subval_sort($array, 0); print_r($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/q4ZtL
function name:  (null)
number of ops:  10
compiled vars:  !0 = $array, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   21     1        INIT_FCALL                                               'subval_sort'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 0
          4        DO_FCALL                                      0  $3      
          5        ASSIGN                                                   !1, $3
   23     6        INIT_FCALL                                               'print_r'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Function subval_sort:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 12
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 12
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 12
2 jumps found. (Code = 77) Position 1 = 17, Position 2 = 23
Branch analysis from position: 17
2 jumps found. (Code = 78) Position 1 = 18, Position 2 = 23
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
Branch analysis from position: 12
filename:       /in/q4ZtL
function name:  subval_sort
number of ops:  26
compiled vars:  !0 = $a, !1 = $subkey, !2 = $v, !3 = $k, !4 = $b, !5 = $val, !6 = $key, !7 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   11     2      > FE_RESET_R                                       $8      !0, ->12
          3    > > FE_FETCH_R                                       ~9      $8, !2, ->12
          4    >   ASSIGN                                                   !3, ~9
   12     5        INIT_FCALL                                               'strtolower'
          6        FETCH_DIM_R                                      ~12     !2, !1
          7        SEND_VAL                                                 ~12
          8        DO_ICALL                                         $13     
          9        ASSIGN_DIM                                               !4, !3
         10        OP_DATA                                                  $13
   11    11      > JMP                                                      ->3
         12    >   FE_FREE                                                  $8
   14    13        INIT_FCALL                                               'asort'
         14        SEND_REF                                                 !4
         15        DO_ICALL                                                 
   15    16      > FE_RESET_R                                       $15     !4, ->23
         17    > > FE_FETCH_R                                       ~16     $15, !5, ->23
         18    >   ASSIGN                                                   !6, ~16
   16    19        FETCH_DIM_R                                      ~19     !0, !6
         20        ASSIGN_DIM                                               !7
         21        OP_DATA                                                  ~19
   15    22      > JMP                                                      ->17
         23    >   FE_FREE                                                  $15
   18    24      > RETURN                                                   !7
   19    25*     > RETURN                                                   null

End of function subval_sort

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.67 ms | 1403 KiB | 20 Q