3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = Array ( 0 => Array ( 'id' => 16059, 'product_id' => 4013, 'Product' => Array ( 'id' => 4013, 'name' => 'XYZ' ) ), 1 => Array ( 'id' => 16060, 'product_id' => 4462, 'Product' => Array ( 'id' => 4462, 'name' => 'MNOP' ) ), 2 => Array ( 'id' => 16061, 'product_id' => 4473, 'Product' => Array ( 'id' => 4473, 'name' => 'ABCD' ) ) ); usort($array, function($a, $b) { return strcmp($a['Product']['name'] , $b['Product']['name']); }); print_r($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Cb5S5
function name:  (null)
number of ops:  10
compiled vars:  !0 = $array
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   42     1        INIT_FCALL                                                   'usort'
          2        SEND_REF                                                     !0
          3        DECLARE_LAMBDA_FUNCTION                              ~2      [0]
   44     4        SEND_VAL                                                     ~2
   42     5        DO_ICALL                                                     
   46     6        INIT_FCALL                                                   'print_r'
          7        SEND_VAR                                                     !0
          8        DO_ICALL                                                     
          9      > 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/Cb5S5
function name:  {closure:/in/Cb5S5:42}
number of ops:  12
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   42     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
   43     2        INIT_FCALL                                                   'strcmp'
          3        FETCH_DIM_R                                          ~2      !0, 'Product'
          4        FETCH_DIM_R                                          ~3      ~2, 'name'
          5        SEND_VAL                                                     ~3
          6        FETCH_DIM_R                                          ~4      !1, 'Product'
          7        FETCH_DIM_R                                          ~5      ~4, 'name'
          8        SEND_VAL                                                     ~5
          9        DO_ICALL                                             $6      
         10      > RETURN                                                       $6
   44    11*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
172.91 ms | 2442 KiB | 16 Q