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){ //if(!in_array($a['for'], $b['deps']) && !in_array($b['for'], $a['deps'])) // return 0; return in_array($a['for'], $b['deps']) ? -1 : 1; }); var_dump($deps);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4T4iT
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%2F4T4iT%3A9%240'
   13     4        SEND_VAL                                                 ~2
          5        DO_ICALL                                                 
   15     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

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

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
192.08 ms | 1396 KiB | 19 Q