3v4l.org

run code in 300+ PHP versions simultaneously
<?php $deps = [ // ['for' => '$T3', 'deps' => ['$T2'] ], ['for' => '$T1', 'deps' => [] ], ['for' => '$T2', 'deps' => ['$T1'] ] ]; uasort($deps, function($a, $b){ return in_array($a['for'], $b) ? 1 : -1; }); var_dump($deps);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5bX0h
function name:  (null)
number of ops:  10
compiled vars:  !0 = $deps
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1        INIT_FCALL                                               'uasort'
          2        SEND_REF                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F5bX0h%3A9%240'
   11     4        SEND_VAL                                                 ~2
          5        DO_ICALL                                                 
   13     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F5bX0h%3A9%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5bX0h
function name:  {closure}
number of ops:  13
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   10     2        INIT_FCALL                                               'in_array'
          3        FETCH_DIM_R                                      ~2      !0, 'for'
          4        SEND_VAL                                                 ~2
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $3      
          7      > JMPZ                                                     $3, ->10
          8    >   QM_ASSIGN                                        ~4      1
          9      > JMP                                                      ->11
         10    >   QM_ASSIGN                                        ~4      -1
         11    > > RETURN                                                   ~4
   11    12*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F5bX0h%3A9%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.47 ms | 1395 KiB | 19 Q