3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array( array( "Products" => array( "code" => "LD", "power" => "5", "channels" => "2" ) ), array( "Products" => array( "code" => "CAE", "power" => "15", "channels" => "1" ) ), array( "Products" => array( "code" => "FC", "power" => "12", "channels" => "1" ) ) ); function mySort($a, $b) { return strcasecmp($b["Products"]["code"], $a["Products"]["code"]); } usort($arr, "mySort"); print_r($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ailmf
function name:  (null)
number of ops:  9
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
   35     1        INIT_FCALL                                               'usort'
          2        SEND_REF                                                 !0
          3        SEND_VAL                                                 'mySort'
          4        DO_ICALL                                                 
   37     5        INIT_FCALL                                               'print_r'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Function mysort:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ailmf
function name:  mySort
number of ops:  12
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   30     2        INIT_FCALL                                               'strcasecmp'
          3        FETCH_DIM_R                                      ~2      !1, 'Products'
          4        FETCH_DIM_R                                      ~3      ~2, 'code'
          5        SEND_VAL                                                 ~3
          6        FETCH_DIM_R                                      ~4      !0, 'Products'
          7        FETCH_DIM_R                                      ~5      ~4, 'code'
          8        SEND_VAL                                                 ~5
          9        DO_ICALL                                         $6      
         10      > RETURN                                                   $6
   31    11*     > RETURN                                                   null

End of function mysort

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.72 ms | 1395 KiB | 19 Q