3v4l.org

run code in 500+ PHP versions simultaneously
<?php function sort_start_ascending( $a, $b ) { return $a['start'] - $b['start']; } $array = array( array( 'name' => 'first', 'start' => 4 ), array( 'name' => 'second', 'start' => 4 ), ); usort( $array, 'sort_start_ascending' ); print_r( $array );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JO7urg
function name:  (null)
number of ops:  9
compiled vars:  !0 = $array
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                       !0, <array>
   17     1        INIT_FCALL                                                   'usort'
          2        SEND_REF                                                     !0
          3        SEND_VAL                                                     'sort_start_ascending'
          4        DO_ICALL                                                     
   19     5        INIT_FCALL                                                   'print_r'
          6        SEND_VAR                                                     !0
          7        DO_ICALL                                                     
          8      > RETURN                                                       1

Function sort_start_ascending:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JO7urg
function name:  sort_start_ascending
number of ops:  7
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
    4     2        FETCH_DIM_R                                          ~2      !0, 'start'
          3        FETCH_DIM_R                                          ~3      !1, 'start'
          4        SUB                                                  ~4      ~2, ~3
          5      > RETURN                                                       ~4
    5     6*     > RETURN                                                       null

End of function sort_start_ascending

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
215.75 ms | 3438 KiB | 15 Q