3v4l.org

run code in 300+ PHP versions simultaneously
<?php $module_updates = array( 2 => 'update_2', 1000 => 'update_1000', 7001 => 'update_7001', 8000 => 'update_8000', 1001 => 'update_1001', 7000 => 'update_7000', ); uksort($module_updates, function($a, $b) { if ($a >= 7000 && $a < 9000) { $a -= 7000; } if ($b >= 7000 && $b < 9000) { $b -= 7000; } return ($a == $b) ? 0 : ($a > $b ? 1 : -1); }); print_r($module_updates);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2dWkf
function name:  (null)
number of ops:  10
compiled vars:  !0 = $module_updates
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   10     1        INIT_FCALL                                               'uksort'
          2        SEND_REF                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F2dWkf%3A10%240'
   18     4        SEND_VAL                                                 ~2
          5        DO_ICALL                                                 
   19     6        INIT_FCALL                                               'print_r'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F2dWkf%3A10%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 8
Branch analysis from position: 7
2 jumps found. (Code = 46) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 14
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 22
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
Branch analysis from position: 12
Branch analysis from position: 8
Branch analysis from position: 6
filename:       /in/2dWkf
function name:  {closure}
number of ops:  26
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   11     2        IS_SMALLER_OR_EQUAL                              ~2      7000, !0
          3      > JMPZ_EX                                          ~2      ~2, ->6
          4    >   IS_SMALLER                                       ~3      !0, 9000
          5        BOOL                                             ~2      ~3
          6    > > JMPZ                                                     ~2, ->8
   12     7    >   ASSIGN_OP                                     2          !0, 7000
   14     8    >   IS_SMALLER_OR_EQUAL                              ~5      7000, !1
          9      > JMPZ_EX                                          ~5      ~5, ->12
         10    >   IS_SMALLER                                       ~6      !1, 9000
         11        BOOL                                             ~5      ~6
         12    > > JMPZ                                                     ~5, ->14
   15    13    >   ASSIGN_OP                                     2          !1, 7000
   17    14    >   IS_EQUAL                                                 !0, !1
         15      > JMPZ                                                     ~8, ->18
         16    >   QM_ASSIGN                                        ~9      0
         17      > JMP                                                      ->24
         18    >   IS_SMALLER                                               !1, !0
         19      > JMPZ                                                     ~10, ->22
         20    >   QM_ASSIGN                                        ~11     1
         21      > JMP                                                      ->23
         22    >   QM_ASSIGN                                        ~11     -1
         23    >   QM_ASSIGN                                        ~9      ~11
         24    > > RETURN                                                   ~9
   18    25*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F2dWkf%3A10%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.4 ms | 1400 KiB | 17 Q