3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = array ( 0 => array ( 0 => 'B.Howell', 1 => 16.8, ), 1 => array ( 0 => 'B.Osweiler', 1 => 14.88, ), 2 => array ( 0 => 'K.Ballage', 1 => 13.7, ), 3 => array ( 0 => 'F.Owusu', 1 => 8.8, ), 4 => array ( 0 => 'I.Ford', 1 => 6.3, ), 5 => array ( 0 => 'B.Radcliff', 1 => 6.4, ), 6 => array ( 0 => 'D.Fales', 1 => 3.96, ), 7 => array ( 0 => 'L.Carroo', 1 => 4.9, ), 8 => array ( 0 => 'R.Scott', 1 => 2.5, ), 9 => array ( 0 => 'M.Lewis', 1 => 2.4, ), 10 => array ( 0 => 'T.Duarte', 1 => 3.2, ), 11 => array ( 0 => 'J.Langford', 1 => 2.8, ), 12 => array ( 0 => 'A.Derby', 1 => 1.1, ), 13 => array ( 0 => 'D.Morgan', 1 => 1.2, ), ); print '<pre>'; print "Before Sort". PHP_EOL;; //print_r($array); usort($array, function($a, $b) { if($a[1]==$b[1]){ return 0; } return ($a[1] > $b[1]) ? -1 : 1; }); print "After Sort". PHP_EOL; print_r($array); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/c4UmQ
function name:  (null)
number of ops:  13
compiled vars:  !0 = $array
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, <array>
    5     1        ECHO                                                         '%3Cpre%3E'
    6     2        ECHO                                                         'Before+Sort%0A'
    8     3        INIT_FCALL                                                   'usort'
          4        SEND_REF                                                     !0
          5        DECLARE_LAMBDA_FUNCTION                              ~2      [0]
   14     6        SEND_VAL                                                     ~2
    8     7        DO_ICALL                                                     
   16     8        ECHO                                                         'After+Sort%0A'
   17     9        INIT_FCALL                                                   'print_r'
         10        SEND_VAR                                                     !0
         11        DO_ICALL                                                     
   18    12      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
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/c4UmQ
function name:  {closure:/in/c4UmQ:8}
number of ops:  16
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
    9     2        FETCH_DIM_R                                          ~2      !0, 1
          3        FETCH_DIM_R                                          ~3      !1, 1
          4        IS_EQUAL                                                     ~2, ~3
          5      > JMPZ                                                         ~4, ->7
   10     6    > > RETURN                                                       0
   13     7    >   FETCH_DIM_R                                          ~5      !0, 1
          8        FETCH_DIM_R                                          ~6      !1, 1
          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
   14    15*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
169.32 ms | 2377 KiB | 15 Q