3v4l.org

run code in 500+ PHP versions simultaneously
<?php $edge_lengths = [420, 593.9696961967, 420]; uksort($edge_lengths, function($k1, $k2) use ($edge_lengths) { return $edge_lengths[$k2] <=> $edge_lengths[$k1] ?: $k2 <=> $k1; }); print_r(array_keys($edge_lengths));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/msZAt
function name:  (null)
number of ops:  14
compiled vars:  !0 = $edge_lengths
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    5     1        INIT_FCALL                                                   'uksort'
          2        SEND_REF                                                     !0
          3        DECLARE_LAMBDA_FUNCTION                              ~2      [0]
          4        BIND_LEXICAL                                                 ~2, !0
    7     5        SEND_VAL                                                     ~2
    5     6        DO_ICALL                                                     
    9     7        INIT_FCALL                                                   'print_r'
          8        INIT_FCALL                                                   'array_keys'
          9        SEND_VAR                                                     !0
         10        DO_ICALL                                             $4      
         11        SEND_VAR                                                     $4
         12        DO_ICALL                                                     
         13      > 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/msZAt
function name:  {closure:/in/msZAt:5}
number of ops:  11
compiled vars:  !0 = $k1, !1 = $k2, !2 = $edge_lengths
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
          2        BIND_STATIC                                                  !2
    6     3        FETCH_DIM_R                                          ~3      !2, !1
          4        FETCH_DIM_R                                          ~4      !2, !0
          5        SPACESHIP                                            ~5      ~3, ~4
          6        JMP_SET                                              ~6      ~5, ->9
          7        SPACESHIP                                            ~7      !1, !0
          8        QM_ASSIGN                                            ~6      ~7
          9      > RETURN                                                       ~6
    7    10*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
168.63 ms | 3346 KiB | 15 Q