3v4l.org

run code in 300+ PHP versions simultaneously
<?php $edge_lengths = [420, 593.9696961967, 420]; uksort($edge_lengths, fn($k1, $k2) => $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/opZrJ
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                                  '%00%7Bclosure%7D%2Fin%2FopZrJ%3A5%240'
          4        BIND_LEXICAL                                             ~2, !0
          5        SEND_VAL                                                 ~2
          6        DO_ICALL                                                 
    7     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

Function %00%7Bclosure%7D%2Fin%2FopZrJ%3A5%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/opZrJ
function name:  {closure}
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
          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
         10*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FopZrJ%3A5%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.53 ms | 1406 KiB | 19 Q