3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = [ ['array-5', 0], ['array-7', -.5], ['array-4', 0], ['array-1',-1], ['array-3', 2], ['array-6', .5], ['array-2', 3], ['array-8', -2] ]; usort( $array, fn($a, $b) => [$b[1] < 0, abs($b[1])] <=> [$a[1] < 0, abs($a[1])] ); var_export($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hmUVn
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>
   14     1        INIT_FCALL                                                   'usort'
   15     2        SEND_REF                                                     !0
   16     3        DECLARE_LAMBDA_FUNCTION                              ~2      [0]
   19     4        SEND_VAL                                                     ~2
   14     5        DO_ICALL                                                     
   20     6        INIT_FCALL                                                   'var_export'
          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/hmUVn
function name:  {closure:/in/hmUVn:16}
number of ops:  21
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   16     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
          2        FETCH_DIM_R                                          ~2      !1, 1
          3        IS_SMALLER                                           ~3      ~2, 0
          4        INIT_ARRAY                                           ~4      ~3
          5        INIT_FCALL                                                   'abs'
          6        FETCH_DIM_R                                          ~5      !1, 1
          7        SEND_VAL                                                     ~5
          8        DO_ICALL                                             $6      
          9        ADD_ARRAY_ELEMENT                                    ~4      $6
   18    10        FETCH_DIM_R                                          ~7      !0, 1
         11        IS_SMALLER                                           ~8      ~7, 0
         12        INIT_ARRAY                                           ~9      ~8
         13        INIT_FCALL                                                   'abs'
         14        FETCH_DIM_R                                          ~10     !0, 1
         15        SEND_VAL                                                     ~10
         16        DO_ICALL                                             $11     
         17        ADD_ARRAY_ELEMENT                                    ~9      $11
         18        SPACESHIP                                            ~12     ~4, ~9
         19      > RETURN                                                       ~12
   19    20*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
156.9 ms | 1782 KiB | 16 Q