3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ 0 => [23, 890], 1 => [56, 401], 2 => [56, 491], 3 => [98, 840], 4 => [56, 821], 5 => [98, 401], 6 => [23, 875], ]; uasort($arr, function ($a, $b) { if( $a[0] != $b[0] ) return $a[0] - $b[0]; else if( strval($a[1])[1] == 9 ) return 1; else return $a[1] - $b[1]; }); print_r($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jufbu
function name:  (null)
number of ops:  10
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   12     1        INIT_FCALL                                               'uasort'
          2        SEND_REF                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fjufbu%3A12%240'
   20     4        SEND_VAL                                                 ~2
          5        DO_ICALL                                                 
   22     6        INIT_FCALL                                               'print_r'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2Fjufbu%3A12%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 11
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jufbu
function name:  {closure}
number of ops:  23
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   13     2        FETCH_DIM_R                                      ~2      !0, 0
          3        FETCH_DIM_R                                      ~3      !1, 0
          4        IS_NOT_EQUAL                                             ~2, ~3
          5      > JMPZ                                                     ~4, ->11
   14     6    >   FETCH_DIM_R                                      ~5      !0, 0
          7        FETCH_DIM_R                                      ~6      !1, 0
          8        SUB                                              ~7      ~5, ~6
          9      > RETURN                                                   ~7
         10*       JMP                                                      ->22
   16    11    >   FETCH_DIM_R                                      ~8      !0, 1
         12        CAST                                          6  ~9      ~8
         13        FETCH_DIM_R                                      ~10     ~9, 1
         14        IS_EQUAL                                                 ~10, 9
         15      > JMPZ                                                     ~11, ->18
   17    16    > > RETURN                                                   1
         17*       JMP                                                      ->22
   19    18    >   FETCH_DIM_R                                      ~12     !0, 1
         19        FETCH_DIM_R                                      ~13     !1, 1
         20        SUB                                              ~14     ~12, ~13
         21      > RETURN                                                   ~14
   20    22*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fjufbu%3A12%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
184.4 ms | 1396 KiB | 17 Q