3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( array( 'file' => 'file1', 'line' => 1, 'message' => 'foo' ), array( 'file' => 'file1', 'line' => 1, 'message' => 'bar' ) ); usort($array, function($a, $b) { if ($a['file'] !== $b['file']) { return strcmp($a['file'], $b['file']); } else if ($a['line'] === $b['line']) { return 0; } else { return ($a['line'] < $b['line'] ? -1 : 1); } } ); var_dump($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RYTt9
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>
   16     1        INIT_FCALL                                               'usort'
          2        SEND_REF                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FRYTt9%3A16%240'
   29     4        SEND_VAL                                                 ~2
          5        DO_ICALL                                                 
   32     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FRYTt9%3A16%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 14
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 26
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RYTt9
function name:  {closure}
number of ops:  29
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   17     2        FETCH_DIM_R                                      ~2      !0, 'file'
          3        FETCH_DIM_R                                      ~3      !1, 'file'
          4        IS_NOT_IDENTICAL                                         ~2, ~3
          5      > JMPZ                                                     ~4, ->14
   19     6    >   INIT_FCALL                                               'strcmp'
          7        FETCH_DIM_R                                      ~5      !0, 'file'
          8        SEND_VAL                                                 ~5
          9        FETCH_DIM_R                                      ~6      !1, 'file'
         10        SEND_VAL                                                 ~6
         11        DO_ICALL                                         $7      
         12      > RETURN                                                   $7
         13*       JMP                                                      ->28
   21    14    >   FETCH_DIM_R                                      ~8      !0, 'line'
         15        FETCH_DIM_R                                      ~9      !1, 'line'
         16        IS_IDENTICAL                                             ~8, ~9
         17      > JMPZ                                                     ~10, ->20
   23    18    > > RETURN                                                   0
         19*       JMP                                                      ->28
   27    20    >   FETCH_DIM_R                                      ~11     !0, 'line'
         21        FETCH_DIM_R                                      ~12     !1, 'line'
         22        IS_SMALLER                                               ~11, ~12
         23      > JMPZ                                                     ~13, ->26
         24    >   QM_ASSIGN                                        ~14     -1
         25      > JMP                                                      ->27
         26    >   QM_ASSIGN                                        ~14     1
         27    > > RETURN                                                   ~14
   29    28*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FRYTt9%3A16%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.08 ms | 1392 KiB | 19 Q