3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array( array('prior' => 1, 'name' => 'name'), array('prior' => 5, 'name' => 'name'), array('prior' => 2, 'name' => 'name'), array('prior' => 10, 'name' => 'name'), array('prior' => 12, 'name' => 'name'), array('prior' => 4, 'name' => 'name'), array('prior' => 7, 'name' => 'name'), array('prior' => 3, 'name' => 'name'), array('prior' => 8, 'name' => 'name'), array('prior' => 1, 'name' => 'name'), array('prior' => 12, 'name' => 'name'), ); usort($a, function($a, $b) { if ($a['prior'] == $b['prior']) return 0; return ($a['prior'] > $b['prior']) ? -1 : 1; }); foreach($a as $task) { echo $task['prior'] . ': ' . $task['name'] . PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 15
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 15
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/SZhpB
function name:  (null)
number of ops:  17
compiled vars:  !0 = $a, !1 = $task
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   17     1        INIT_FCALL                                               'usort'
          2        SEND_REF                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FSZhpB%3A17%240'
   20     4        SEND_VAL                                                 ~3
          5        DO_ICALL                                                 
   22     6      > FE_RESET_R                                       $5      !0, ->15
          7    > > FE_FETCH_R                                               $5, !1, ->15
   23     8    >   FETCH_DIM_R                                      ~6      !1, 'prior'
          9        CONCAT                                           ~7      ~6, '%3A+'
         10        FETCH_DIM_R                                      ~8      !1, 'name'
         11        CONCAT                                           ~9      ~7, ~8
         12        CONCAT                                           ~10     ~9, '%0A'
         13        ECHO                                                     ~10
   22    14      > JMP                                                      ->7
         15    >   FE_FREE                                                  $5
   24    16      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FSZhpB%3A17%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.58 ms | 1405 KiB | 15 Q